onlinepersona ( onlinepersona@programming.dev ) to Programmer Humor@programming.devEnglish · 3 years agoShow me a better text format for serializingimgur.comexternal-linkmessage-square28linkfedilinkarrow-up182file-text
arrow-up182external-linkShow me a better text format for serializingimgur.comonlinepersona ( onlinepersona@programming.dev ) to Programmer Humor@programming.devEnglish · 3 years agomessage-square28linkfedilinkfile-text
minus-squarejjjalljs ( jjjalljs@ttrpg.network ) linkfedilinkarrow-up22·3 years agoYes, 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.
minus-squareOmnipotentEntity ( OmnipotentEntity@beehaw.org ) linkfedilinkarrow-up12·3 years agoChange to Haskell formatted commas and the problem goes away :D { "a": 1 , "b": 2 , "c": [ 3 , 6 , 9 ] }
minus-squareursakhiin ( ursakhiin@beehaw.org ) linkfedilinkarrow-up31·3 years agoWhere is the nearest fire to dump this comment in?
minus-squareadambowles ( adambowles@feddit.uk ) linkfedilinkarrow-up6·3 years agoTrailing commas are supported in json5, as well as comments
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 comments