6 ms·
All of these ideas are good (from a consumer perspective, it's too early in the morning to think about implementation issues)...but I have to ask out loud what
by danso 12y ago
All of these ideas are good (from a consumer perspective, it's too early in the morning to think about implementation issues)...but I have to ask out loud what I frequently just think...why don't we just start adopting YAML more? Or, at least, a subset of the "safe" kind of YAML, mostly restricted to what JSON can do?
- skorecky 12y agoYeah, while this is a neat idea, it doesn't add much value. I rather have structure to my data.
- mahmoudimus 12y agoWait, what? Can you elaborate? YAML is used as serialization data format. Are you implying, perhaps, that YAML does not impose structure?
- doodpants 12y agoI think skorecky was agreeing with danso, and implying that Hjson is lacking adequate structure.
- mahmoudimus 12y agoAh, was confused there for a sec. Thanks for clarifying.
- chris-at 12y agoIMO yaml is too complex. Just take a look at the spec: http://www.yaml.org/spec/1.2/spec.html http://www.yaml.org/spec/1.2/spec.html
- vlunkr 12y agoSure YAML is more complex than JSON, but that's because it's more than just a data structure. If you are using it only for things that JSON can do, it's really not that complex.
- thirdtruck 12y agoAgreed. I use a YAML file to track my daily agenda. It was easier to figure out the format, and to leverage existing parser libraries for my reports, than to write my own "agenda-optimized" file format. A good example of http://xkcd.com/1205/ http://xkcd.com/1205/.
- peteretep 12y agoWhich is why the original poster said "the safe version". Simple YAML is simple.
- richthegeek 12y agoAs a JS developer, I use JSON because I can just put it directly in my code as a variable. Annoyingly, "x = some_json" is much less strict than "JSON.parse(some_json)". Whilst YAML is less ambiguous, the significant whitespace and not being able to just cut and paste an argument into usefuleness (without wrapping it in a parser) means the effort is too high for what little pay-off it provides.
- shkkmo 12y agoAs I understand, the advantage is that you can then use a hjson processor to process both json and hjson config files.