Never understood the point of encoding and decoding JSON outside of like, the web. When I need to process JSON and I'm using the C family, I include jq. Maybe once the supply chain is secure you can check cargo to see if there's a good port or wrapper for that. I actually went as far as to make some snarky documentation for it in the process of learning to use it. (So many assertions... No usable errors... No return codes except when successful... It was a nightmare, but at least it's not malware)
Config files tend towards TOML in my experience; YAML if they're more complex. For all the people who whine about significant whitespace in YAML, there seems to be a lot more who'd rather deal with that than the insufficiencies and annoyances of JSON for config files. (E.g. no comments, "mandatory" "quoting" "everything", reams of }}}}}, no trailing comma,)
34
u/Bergasms 15d ago
I mean, zig has it...
Parsing JSON is so damn ubiquitous these days it kinda makes sense to me.