JSON to YAML Converter
Convert between JSON and YAML without either document leaving your browser.
JSON
Colorazione sintattica disattivata.
YAML
Colorazione sintattica disattivata.
Il risultato appare qui.
Funziona interamente nel tuo browser.
Su questo strumento
YAML is a larger language than JSON, so this converts the subset that JSON can hold and refuses the rest by name rather than mangling it. Writing, a mapping becomes one key per line and an array repeats its key or dash per item, a string is quoted only when it would otherwise read as a number, a boolean, a null or a YAML indicator, and a null becomes a key with no value; an array can also be written as its own multi-document stream, one --- separated document per element, instead of one sequence, an explicit choice rather than the default, since an ordinary array gives no signal on its own for which reading was meant. Reading, a mapping, a sequence, a quoted string, a block scalar, a flow collection and a folded plain scalar are all read, an anchor and the aliases that point at it are resolved by copying the anchored value to every place that refers to it, and a stream of more than one --- separated document comes back as a JSON array, one element per document; tags and complex mapping keys are still refused by name. A plain scalar folds across the more indented lines that belong to it, and a line that turns out to open a block instead is refused rather than swallowed, because YAML cannot continue a plain scalar with an indicator. Numbers travel through the token stream, so a twenty digit integer comes back with all twenty digits, anchored or not.
Come usare
- Choose a direction, then paste your document into the left pane or load the sample.
- Pick the indent width, then press Convert.
- Copy the result or download it as a file.