JSON to YAML
Processed in your browser · nothing is uploaded
Serialises JSON as YAML, quoting any string that would otherwise be read back as a different type — which is the part hand-conversion gets wrong.
How to use the json to yaml
The quoting rules are the whole job. A JSON string `"1.0"` written to YAML unquoted comes back as the number 1, losing the trailing zero and changing the type — which matters enormously for a version number. The same applies to `"true"`, `"no"`, `"null"` and anything starting with a digit. This quotes all of them. Going in this direction is always safe, unlike parsing, because serialising has no ambiguity to resolve: there is exactly one correct YAML representation of any JSON value, and the only question is how much of it needs quotes.
Questions
Because they would be read back as a number, boolean or null otherwise. "1.0" unquoted becomes the number 1.