onlinepersona@programming.dev to Programmer Humor@programming.devEnglish · 2 years agoShow me a better text format for serializingimgur.comexternal-linkmessage-square57fedilinkarrow-up1115arrow-down124file-text
arrow-up191arrow-down1external-linkShow me a better text format for serializingimgur.comonlinepersona@programming.dev to Programmer Humor@programming.devEnglish · 2 years agomessage-square57fedilinkfile-text
minus-squarejjjalljs@ttrpg.networklinkfedilinkarrow-up26arrow-down2·edit-22 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-squareadambowles@feddit.uklinkfedilinkarrow-up9·2 years agoTrailing commas are supported in json5, as well as comments
minus-squareOmnipotentEntity@beehaw.orglinkfedilinkarrow-up8·2 years agoChange to Haskell formatted commas and the problem goes away :D { "a": 1 , "b": 2 , "c": [ 3 , 6 , 9 ] }
minus-squareursakhiin@beehaw.orglinkfedilinkarrow-up28·2 years agoWhere is the nearest fire to dump this comment in?
minus-squareSgtmoustache@lemmy.worldlinkfedilinkarrow-up4arrow-down7·2 years agoI’m pretty sure you can have trailing commas…
minus-squareBjornir@programming.devlinkfedilinkarrow-up1·2 years agoYou can’t but some parser allow them. But those that do do not respect the standard.
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.
Trailing commas are supported in json5, as well as comments
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…
deleted by creator
You can’t but some parser allow them. But those that do do not respect the standard.