3 ms·
Author has no clue, but I don't blame him. There are - similar to the JSON insanity - multiple YAML standards. YAML 1.1 and 1.2+ are the important ones, as th
by endycm 2y ago
Author has no clue, but I don't blame him.
There are - similar to the JSON insanity - multiple YAML standards.
YAML 1.1 and 1.2+ are the important ones, as the "superset" argument is only valid since 1.2.
HOWEVER PyYAML is a YAML 1.1 parser: https://pypi.org/project/PyYAML/#description https://pypi.org/project/PyYAML/#description
This also can be responsible for many security problems, as ppl will assume things about JSON and YAML, but don't worry about which of the 8 different JSON standards / YAML implementations they use.
- deleted 2y ago[deleted]
- n2d4 2y agoYAML 1.2.2 is also not a JSON superset, as keys are required to be unique: > The content of a mapping node is an unordered set of key/value node pairs, with the restriction that each of the keys is unique https://yaml.org/spec/1.2.2/#representation-graph https://yaml.org/spec/1.2.2/#representation-graph
- jorams 2y agoYAML says keys MUST be unique, while JSON says they SHOULD be unique. It is therefore possible to produce technically valid JSON documents that aren't valid YAML, so it is in that sense not a strict superset. At the same time those documents aren't portable across JSON implementations either. Rejecting duplicate keys is a valid implementation of the JSON spec.