convert YAML to JSONConverters
Turns YAML configuration into JSON.
Check YAML for syntax errors as you type, then rewrite it with consistent indentation. Errors show the line and column with a hint for the usual culprits: tabs, bad indentation, and stray colons.
.yaml or .yml file. It is checked as you type.The input is parsed with js-yaml using the YAML 1.2 core schema, the same rules most modern tools follow.
--- lines.name: web image: nginxis invalid:
image is indented more than name but name already has a value. Fix: line the keys up.title: Error: not found is invalid, because the second : starts another mapping. Fix: quote the value, title: "Error: not found".port on two lines, gives a duplicated mapping key error.services: {web: {ports: [80, 443]}} is valid, and formatting with 2 spaces gives:services:
web:
ports:
- 80
- 443!Ref and !Sub in CloudFormation, or !reference in GitLab CI, are reported as unknown tags.Not for indentation. YAML only allows spaces there. Tabs are fine inside quoted strings.
Older YAML 1.1 parsers read yes, no, on, and off as booleans. This tool uses YAML 1.2, where only true and false are booleans, but it quotes such words when formatting so older tools read them as text too.
No. Comments are dropped when the YAML is rewritten. Validation alone never changes your input.
No. It is checked and formatted in your browser.
Often used together with the YAML Validator & Formatter.
Turns YAML configuration into JSON.
Turns JSON into readable YAML for configuration files.
Converts YAML documents into well-formed, indented XML.