4 ms·
You can turn any piece of a YAML into a JSON object and it will be read just as well. This YAML: user: name: Ted is equivalent to this YAML: u
by rudian 5y ago
You can turn any piece of a YAML into a JSON object and it will be read just as well.
This YAML:
user:
name: Ted
is equivalent to this YAML:
user: {"name": "Ted"}
which is equivalent to this YAML/JSON:
{"user": {"name": "Ted"}}
- Spivak 5y agoWhile true, this is what being a supperset means. What it means is that any JSON document is, without modification, valid YAML document and can be read with a YAML parser.
- erik_seaberg 5y agoYAML supports tagged nodes and multiple documents in a stream, which can’t be represented in standard JSON. (You could make up conventions, but only your parser would support them.)