3 ms·
YAML is a superset of JSON. So this works just fine to parse JSON (with the caveat it parses any YAML and is therefore not secure): YAML.load(json)
by molf 14y ago
YAML is a superset of JSON. So this works just fine to parse JSON (with the caveat it parses any YAML and is therefore not secure):
YAML.load(json)
- benmmurphy 14y agoah. i wonder if there isn't any json stuff that yaml doesn't support because the convert_json_to_yaml method does a bit of munging. if you take a previous PoC and feed it raw without any modification it corrupts it and makes it invalid yaml. for example convert_json_to_yaml will put spaces around the ':' character.
- molf 14y agoI think that kind of processing is just to work around bugs in the old YAML parser (syck). See this post for example: http://project.ioni.st/post/1067 http://project.ioni.st/post/1067