YAML Is Dead, But Not Dead Enough

I’m trying to wrap my head around YAML.

I can’t point my finger at any individual problem, it’s the whole format that stinks. It just doesn’t feel right. It’s overly-complicated, has 2 million ways to do the same thing, and in the end it’s still very verbose and not really human-readable. Not more than JSON at least.

Funnily, the last YAML specification (1.2) has been extended and modified so that JSON is actually a subset of YAML. Now, I appreciate the effort, but come on, if you can already serialize just about anything in JSON, why would you want to use a superset of it?

Luckily, YAML never really took foot outside Ruby (on Rails). If you search StackOverflow for questions tagged [yaml], 699 come up (including mine). [json] gives you 20,596 questions. The term dead comes to mind.

Yet the Ruby (on Rails) community lives happily with their format. I guess they have to maintain backwards compatibility, but I think they should start deprecating YAML in favor of JSON, which is more interoperable, faster and simpler to read and write (even by hand). And has the outrageous advantage of being natively supported in browsers via JavaScript.

Now try finding a decent YAML library for a language other than Ruby. Good luck. JSON? There are truckloads of excellent libraries. .NET even has a JSON serializer built-in (OK, it’s kinda crappy, but at least it’s there (.NET 4.5 will include the excellent JSON.NET))*.

All in all, I guess we can call YAML dead. Or rather, a living dead because it’s still haunting the dreams of many developers out there.

* Nested parentheses, that’s so Lisp.


Posted

in

by

Comments

2 responses to “YAML Is Dead, But Not Dead Enough”

  1. adam Avatar
    adam

    How sad because yaml can do awesome things like references. The only thing wrong with yaml is it’s lack of adoption. Otherwise, it’s powerful and concise- there’s nothing human readable about json’s punctuation.

  2. Bobby Avatar
    Bobby

    One thing missing from JSON…. CANNOT DO COMMENTS. Comments are essential to make any document understandable to a human. YAML is basically JSON improved, and JSON definitely needed the improvements.