Convert JSON5 to YAML
Turn JSON5 files into YAML. Comments are dropped, keys are quoted, and hexadecimal, leading-dot and plus-signed numbers become plain numbers, while Infinity and NaN become null.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop JSON5 files on the dialor turn it to pick what to do
JSON5 as plain YAML data.Comments go, keys get quoted, and odd numbers become plain ones.
What you get
One YAML file with the same data as your JSON5 file. Key order is kept, so the output reads in the same order as the input.
Keys are written quoted. Hexadecimal, leading-dot and plus-signed numbers become plain numbers.
What changes
Comments are dropped. YAML output here carries only the data, so any notes you wrote in the JSON5 file are not in the result.
Infinity and NaN become null. If your file uses either value, check that null works where the data is read next.
When it fails
A file that cannot be parsed stops the conversion with
input_corrupted. This happens when the JSON5 itself is not valid.To go the other way, use YAML to JSON5.
JSON5 and YAML.What each format is.
The formats
JSON5
JSON with comments, trailing commas and unquoted keys.
- Extensions
- .json5
- MIME type
- application
/json5 - Kind
- Text and data
YAML
YAML configuration and data files.
- Extensions
- .yaml .yml
- MIME type
- application
/yaml - Kind
- Text and data
In your code.The same JSON5 to YAML conversion through the API, for your app or your agent.
$ cv convert report.json5 report.yaml$ cv convert report.json5 report.yamlQuestions.What people ask about JSON5 to YAML.
Yes. Key order is kept in the YAML file.
No. Comments in the JSON5 file are dropped.
They become plain numbers. Leading-dot and plus-signed numbers are converted the same way.
Both become null in the YAML file.