2 ms·
>JSON is a subset of YAML anyway. It isn't, really. A conforming YAML parser will not treat JSON data the same way that a JSON parser will in all cases. [0,1]
by krapp 4y ago
>JSON is a subset of YAML anyway.
It isn't, really. A conforming YAML parser will not treat JSON data the same way that a JSON parser will in all cases. [0,1] The only correct way to deal with JSON is using a JSON parser.
[0]https://john-millikin.com/json-is-not-a-yaml-subset https://john-millikin.com/json-is-not-a-yaml-subset
[1]https://news.ycombinator.com/item?id=31406473 https://news.ycombinator.com/item?id=31406473
- nerdponx 4y agoIs the "%YAML 1.2" directive necessary? Seems like something that you should be able to turn on in a YAML parsing library.