3 ms·
Did I read correctly that YAML is a superset of JSON? > This means that, in theory at least, a YAML parser can understand JSON Does anyone have experience wit
by yebyen 8y ago
Did I read correctly that YAML is a superset of JSON?
> This means that, in theory at least, a YAML parser can understand JSON
Does anyone have experience with this? It seems counter-intuitive at first, but Google agrees, and I don't know enough about parsers to say it's wrong. Can you really feed pretty much any JSON file into a YAML parser and get back a valid and correct, properly formed data structure?
- ChrisSD 8y agoThe explicit goal of yaml 1.2 was to fix up any incompatibilities with json. http://yaml.org/spec/1.2/spec.html http://yaml.org/spec/1.2/spec.html
- filmor 8y agoYes, the only problem I have encountered was some version of pyyaml that couldn't deal with \t characters (which are valid in JSON but not YAML 1.1, 1.2 fixed this).