JSON to YAML
Parse valid JSON and generate YAML with the yaml package's YAML.stringify.
How to use
- Enter JSON and run to copy the YAML result.
Capabilities and scope
The JSON structure is represented as YAML but no comments or anchors absent from the source data are invented.
How it works
JSON.parse(input) is passed directly to YAML.stringify.
Example
{"name":"Murelio"} becomes a YAML line such as name: Murelio.
Useful for
- Turn JSON configuration into a more editable YAML representation
Before you use it
- Output style follows the yaml library's serializer defaults and original JSON formatting is not preserved.
Frequently asked questions
Are JSON keys alphabetically sorted?
No explicit sorting is performed; output generally follows parsed object enumeration order.