A while ago, I had an epiphany about all JSON being valid YAML. Great news, right? You get two formats for one. This issue has undergone further scrutiny and, as usual, there is good news and bad news.
Douglas Crockford, the founder of JSON has removed /* .. */ comments from the JSON specification, which was identified as the singular incompatibility between JSON and YAML. In addition, single-quoted strings were removed which YAML handled differently (in terms of escaping.) So, this is good for unifying the two.
However, another minor difference has been found. In JSON structures, the colon and comma need not be spaced out between items in a collection. In YAML, they do. Observe:
For now, if you’re using Syck to parse JSON, be sure the JSON outputter you’re using is YAML-safe JSON. Clark and Doug are working to find a middle-ground and the spotlight is on YAML’s buzzer finger right now. I’ll let ya know how it goes.