Show me a better text format for serializingonlinepersona@programming.dev to Programmer Humor@programming.dev – 106 points – 8 months agoimgur.comAnd I'll show you YAML (a continuation of this post)54Post a CommentPreviewYou are viewing a single commentView all commentsShow the parent commentYes, but whoever decided that json can't have trailing commas has my ire. { "a": 1, "b": 2, <-- nope } There was some other pitfall I can't remember around missing keys and undefined, too, but I can't remember it now.Change to Haskell formatted commas and the problem goes away :D { "a": 1 , "b": 2 , "c": [ 3 , 6 , 9 ] } Where is the nearest fire to dump this comment in?Trailing commas are supported in json5, as well as commentsI'm pretty sure you can have trailing commas...You can't but some parser allow them. But those that do do not respect the standard.Good to know. Must be why I thought you could. Thanks.1 more...1 more...
Yes, but whoever decided that json can't have trailing commas has my ire. { "a": 1, "b": 2, <-- nope } There was some other pitfall I can't remember around missing keys and undefined, too, but I can't remember it now.Change to Haskell formatted commas and the problem goes away :D { "a": 1 , "b": 2 , "c": [ 3 , 6 , 9 ] } Where is the nearest fire to dump this comment in?Trailing commas are supported in json5, as well as commentsI'm pretty sure you can have trailing commas...You can't but some parser allow them. But those that do do not respect the standard.Good to know. Must be why I thought you could. Thanks.1 more...1 more...
Change to Haskell formatted commas and the problem goes away :D { "a": 1 , "b": 2 , "c": [ 3 , 6 , 9 ] } Where is the nearest fire to dump this comment in?
I'm pretty sure you can have trailing commas...You can't but some parser allow them. But those that do do not respect the standard.Good to know. Must be why I thought you could. Thanks.1 more...
You can't but some parser allow them. But those that do do not respect the standard.Good to know. Must be why I thought you could. Thanks.
Yes, but whoever decided that json can't have trailing commas has my ire.
There was some other pitfall I can't remember around missing keys and undefined, too, but I can't remember it now.
Change to Haskell formatted commas and the problem goes away :D
Where is the nearest fire to dump this comment in?
Trailing commas are supported in json5, as well as comments
I'm pretty sure you can have trailing commas...
You can't but some parser allow them. But those that do do not respect the standard.
Good to know. Must be why I thought you could. Thanks.