Turn YAML into JSON. Comments are dropped. Anchors are resolved.
APIs and many scripts want JSON. People keep writing YAML because the indentation is readable. This page parses YAML 1.2, resolves anchors and aliases, and prints JSON. Comments are documentation for humans; they are not data, so they do not appear in the output.
--- is not a single JSON value; split it first.yes, on and no stay strings. Only true, false and null become JSON booleans and null. That is YAML 1.2, not the older 1.1 rules some blogs still describe.A child key must be indented further than its parent, and the indent must be consistent. A line that starts with a tab while the rest uses spaces will fail even if it looks aligned.
List items need - followed by a space, at the right indent. -item without a space is a string.