News for hackers. Stuff that matters.
Re:JSON vs. YAML – try it yourself by hittaruki on Tuesday April 07, 2015 @02:37AM (#9332317)
Biggest thing about yaml for me was that you can have comments. This is very useful especially when you use it for configuration.

For data interchange, I don't see a lot of advantages to yaml though.

Re:JSON vs. YAML – try it yourself by RubyPinch on Tuesday April 07, 2015 @02:51AM (#9332349)
One thing that comes to mind is (for data interchange), it allows for custom objects to be explicitly marked as such

http://www.yaml.org/spec/1.2/spec.html#id2805712

additionally, it allows multiple top level objects in one file (which JSON can't do (not counting 3rd party modifications))

other than that, not much other use

Re:JSON vs. YAML – try it yourself by Ded7xSEoPKYNsDd on Tuesday April 07, 2015 @06:27AM (#9332946)
> additionally, it allows multiple top level objects in one file (which JSON can't do (not counting 3rd party modifications))

That's just different syntax for a top-level list of objects.

Re:JSON vs. YAML – try it yourself by nperez on Tuesday April 07, 2015 @02:50AM (#9332348)
I hadn't thought about comments - that is a clear advantage to YAML. Great point to bring up, and supports the popular view I'm seeing that YAML is maybe better for config files. I can think of numerous scenarios where a configuration decision could use some context.
Re:JSON vs. YAML – try it yourself by oneeyedpigeon on Tuesday April 07, 2015 @03:00AM (#9332374)
For some use cases - and configuration is a prime example - it can make sense to add the comment directly to the data, as another property of the relevant object. that then allows you to use the comment e.g. in a front-end config editor.
Re:JSON vs. YAML – try it yourself by collyw on Tuesday April 07, 2015 @03:56AM (#9332534)
I could see comments being really useful in an API.