|
|
Subscribe / Log in / New account

Why not JSON?

Why not JSON?

Posted Aug 10, 2017 5:15 UTC (Thu) by drag (guest, #31333)
In reply to: Why not JSON? by corbet
Parent article: An alternative device-tree source language

Any good yaml document should be easily convertible to json and visa versa. If you end up with a yaml document that isn't easily converted to json it's a pretty mean thing to do to somebody.

YAML is nice for smallish configuration files you want easily readable by humans. But for parsing and dealing with lots of data Json wins hands down. Even for human readability it gets very easy to get lost when yaml document sizes grow beyond a certain size.

But either is fine really as long as they are easily convertible to one another. They are actually quite complimentary in practice. Lots of times when I deal with large amounts of json format I will use 'jq' or some similar tool to shrink what I am dealing with down to the specific hunk I am interested in and then convert to yaml if I need to do hand editing or whatever.


to post comments


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