A tab in the indentation
YAML forbids tabs for indentation, and the error is usually reported far from the tab
name: api ports: - 80
Paste either format and get the other. The direction is detected from the input, key order is preserved, and it tells you what the conversion cost you, because converting between these two is never quite lossless.
Or drop a file anywhere on this panel. Nothing is uploaded: the analysis runs in this tab.
The answer appears here
Paste on the left and press Convert. Nothing leaves this tab.
Nothing else to flag.
No formatting problems, and nothing the rules object to. Worth remembering what that covers: this reads the file you pasted, not the account or cluster it will be applied to.
No finding matches that filter.
Real input you can load into the tool above. Each one shows a different thing going wrong, because that is what the tool is for.
YAML forbids tabs for indentation, and the error is usually reported far from the tab
name: api ports: - 80
Structure converted both ways, with types preserved
name: api replicas: 3 ports: - 80
These are the ones that fail silently. The config is accepted, nothing raises an error, and the consequence arrives later.
JSON has no comments, so a round trip through JSON deletes every one of them silently.
Instead:Convert one way only, or keep the YAML as the source of truth.
JSON objects are unordered by specification, and some converters sort keys.
Instead:Use an array if order matters.
Numbers beyond 2^53 lose precision in JSON. An ID written as a bare number can come back changed.
Instead:Quote large integers so they stay strings.
The conversion is the easy part. What matters is what does not survive it.
No mode switch to get wrong. Input starting with a brace or bracket is treated as JSON, anything else as YAML, and the verdict says which way it went.
JSON has no comment syntax, so going YAML to JSON drops every comment. This is not a limitation of the tool, it is the format. Keep the YAML as the source of truth and treat the JSON as generated.
YAML anchors and aliases let a document reuse a block. JSON has no equivalent, so each reference is written out in full. The output is correct, larger, and editing one copy no longer changes the others.
Going JSON to YAML, any string that reads as a boolean or null in YAML gets quoted so it round-trips. The output is safe; the risk is somebody removing those quotes later, which is why they are flagged.