There should be a “Simple YAML” that is just scalars, lists, and dicts.
Comment on Show me a better text format for serializing
magic_lobster_party@kbin.social 11 months ago
JSON for serialization all the way. It’s simple and to the point. It does one thing and does it well. There’s little room for annoying surprises. Any JSON can easily be minified and prettified back and forth. If you want it in binary format you can convert it to BSON.
Yaml is too much of a feature creep. It tries to do way too many things at the same time. There are so many traps to fall into if you’re not cautious enough. The same thing can be written in multitudes of ways.
jjjalljs@ttrpg.network 11 months ago
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.
OmnipotentEntity@beehaw.org 11 months ago
Change to Haskell formatted commas and the problem goes away :D
ursakhiin@beehaw.org 11 months ago
Where is the nearest fire to dump this comment in?
adambowles@feddit.uk 11 months ago
Trailing commas are supported in json5, as well as comments
Sgtmoustache@lemmy.world 11 months ago
I’m pretty sure you can have trailing commas…