YAML isn't a strict superset of JSON, although since YAML 1.2 it is very nearly so; with just a little bit of care you can avoid the edge cases (eg. you can have hash keys longer than 1024 characters in JSON but not in YAML), provided you are cognizant of them.