Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, yes. And we could also have everything as binary. Now, UNIX people decided long ago to use plain text to communicate between processes, mostly because it's infinitely easier to read - and makes it possible to edit by hand if you need to. Have to interface with a REST API which consumes JSON and you want to do some testing? Open your text editor anywhere curl is installed, and you're done. That's pretty damn convenient.


We can't have everything as binary, because us humans can't even agree on which bit is most significant out of a list of 64/32/16/8 bits.


Also becoming commonplace as a config file format.


Yeah. On the other hand, I find YAML much better for this kind of thing. JSON is readable and writable by hand, but it's not terribly nice.


No doubt they both have their benefits, however in an environment particularly suited for working with JSON, like node.js, the additional overhead of a YAML (or other) parser may not be desirable.


Why not? After all, since JSON is not a proper Javascript subset, you still need to parse it somehow. And as JSON is a proper subset of YAML, you should get by with a YAML parser.


I think JSON being a subset of yaml is one of THE biggest mistakes YAML made, second only to making YAML a serialization format.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: