|
|
Subscribe / Log in / New account

Why not JSON?

Why not JSON?

Posted Aug 9, 2017 23:31 UTC (Wed) by mathstuf (subscriber, #69389)
In reply to: Why not JSON? by josh
Parent article: An alternative device-tree source language

Comments, * and & references, and merge key (a supplemental specification) support are worth a lot however.


to post comments

Why not JSON?

Posted Aug 10, 2017 10:58 UTC (Thu) by dbnichol (subscriber, #39622) [Link] (2 responses)

Comments is my #1 reason to prefer YAML over JSON. Every time I find myself writing any non-trivial JSON document I get frustrated that I can't put comments in explaining what's going on. I then have to write another document next to the JSON explaining what's going on in the JSON and hope other people will read it (and that I'll remember to update it the next time I touch the JSON file).

Why not JSON?

Posted Aug 10, 2017 11:09 UTC (Thu) by mathstuf (subscriber, #69389) [Link]

If all you want are comments and you're not coding to a strict spec (i.e., extra keys are allowed), you can add "__comment" fields to JSON, but they're clunky and only fit in around dictionary fields (good luck commenting a large array of integers).

Why not JSON?

Posted Aug 17, 2017 8:10 UTC (Thu) by gowen (guest, #23914) [Link]

Comments is my #
Stopped reading at this point :)


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds