About YAML → JSON
Convert YAML configuration into JSON, with indentation you choose and an option to minify. Parse errors report the YAML line and column so a bad indent is easy to spot.
Multi-document YAML
A YAML file can hold several documents separated by ---, which is how Kubernetes manifests are usually written. Converting one naively keeps only the first document; here every document is parsed and returned as a JSON array, so nothing is silently lost.
Frequently asked questions
- Why did my YAML fail to parse?
- Almost always indentation: YAML forbids tabs for indentation, and list items must line up consistently. The error message gives the line and column where the parser stopped.
- Are dates and times converted?
- YAML parses unquoted dates into date values, which then serialise as ISO 8601 strings in the JSON output. Quote the value in your YAML if you want it kept as a literal string.