5 ms·
I hate editing JSON by hand. Why not YAML?
by raziel2p 11y ago
I hate editing JSON by hand. Why not YAML?
- andybak 11y agoCame here to say exactly the same. It's so easy to support both and for anything where a human is expected to edit it by hand then YAML is far less user-hostile.
- shiggerino 11y agoJekyll uses YAML, which brings me to the question, what does this do besides JSON that Jekyll doesn't?
- smizell 11y agoI work at Apiary and we have a format called MSON for writing data structures in Markdown. https://github.com/apiaryio/mson/ https://github.com/apiaryio/mson/
- barosl 11y agoI think TOML[1] is a strict upgrade of JSON as a configuration file format. It has exactly the same expressiveness, but much more human-readable. [1] https://github.com/toml-lang/toml https://github.com/toml-lang/toml
- collyw 11y agoAgree completely. I have had to configure some relatively large forms in an application using JSON. Its not a particularly easy to read format, and when the nesting is deep its easy to loose a brace, or not notice a trailing comma in a list. (I don't know if YAML solves all of those problems, but it certainly looks easier to read).
- curiousjorge 11y agoyeah especially when you have nested arrays of JSON objects with a dozen fields with very long text content....simple in practice but not very readable or clean for humans.
- WorldWideWayne 11y agoI can give you my own reasons. I avoid YAML because it's not simple like JSON. Just look at the YAML spec - http://www.yaml.org/spec/1.2/spec.html http://www.yaml.org/spec/1.2/spec.html compared to JSON - http://json.org/ http://json.org/ and JSON is already everywhere (as a built-in library, a known mime type, etc). I have to go out of my way in order to use YAML. I guess the other reason is that I never trust projects with names like "Yet Another..." because I feel like it conveys a lack of craftsmanship. Looking at that YAML spec again today, it looks like every feature was thrown into it with little to no discrimination.
- eCa 11y agoJust a nitpick. YAML stands for "YAML Ain't Markup Language".
- WorldWideWayne 11y agoIt started out as "Yet another markup language" though - http://yaml.org/spec/history/2001-05-26.html#sec-intro http://yaml.org/spec/history/2001-05-26.html#sec-intro
- bpicolo 11y agoThe parts you generally use and the length of the spec are entirely different things. This argument is always silly.
- WorldWideWayne 11y agoThere's no need to be rude about it. Your first statement would have sufficed to make your point. Anyway, I didn't say that I don't use it because of the length of the spec. I said I don't use it because it's orders of magnitude more complex than JSON and I used the spec as an example of that. A bigger spec means a bigger parser and a higher probability that other people will not limit themselves to the parts that "you generally use". To that, I added that JSON is everywhere already and YAML isn't. My point about the name seems a little silly, but my intuition has served me well over the years.
- 11y ago
- dduarte 11y agoI converted this project to Jekyll, using YAML as the config and hosted on Github Pages: https://github.com/DDuarte/JekyllConfigurablePersonalSite https://github.com/DDuarte/JekyllConfigurablePersonalSite