How to use it
Paste YAML that uses spaces for indentation. Convert shows JSON. Tabs, anchors, aliases, and tags are rejected with an explanation.
Example
The sample mapping becomes a JSON object.
Input
name: Ada Lovelace
fields:
- mathematics
- computing
born: 1815
Result
{
"name": "Ada Lovelace",
"fields": [
"mathematics",
"computing"
],
"born": 1815
}
How it works
The parser reads indentation, mappings, sequences, quoted strings, comments, booleans, null, and numbers. Flow-style JSON values such as [1, 2] are accepted when they are valid JSON.
Common errors
- Tabs were used for indentation Replace tabs with spaces.
- A line uses & or * Anchors and aliases are not supported. Repeat the value instead.
- The structure is ambiguous Put a space after each colon.
Limitations
This is not a complete YAML 1.1 implementation. yes, no, on, and off stay strings so they are not silently turned into booleans. Multiple documents in one file are not supported.
Privacy
The text you paste is processed in your browser. PepsTools does not receive it, store it, or send it to another service.
Questions
Why is yes not converted to true?
Only true, false, null, and ~ have special meaning here. That keeps the conversion predictable.