Convert YAML to compact JSON
Build a compact JSON fixture from a readable YAML list without a separate minification step.
- Parse the YAML document
YAML to JSON
- Remove JSON formatting whitespace
JSON Minifier
Run both steps
What to check in the example
Three YAML list entries become a one-line JSON array. In this sample the units are numbers and the space inside Pens, blue remains.
Download the source exampleWorking with your own file
Comments and other YAML presentation details have no JSON representation. Check scalar types if a consumer requires a strict schema.