Guide: convert YAML and JSON for configs and CI
Kubernetes, GitHub Actions, and docker-compose use YAML; APIs and front ends consume JSON. Manual copies break significant indentation and types (`true` vs `"true"`).
Parse and serialize locally — convert staging manifests without leaking secrets to a backend. Strip sensitive keys before pasting into any online tool.
Use when migrating structured env files, validating helm charts, or generating JSON for API tests. Run through the JSON viewer afterward to confirm nesting.
Step by step
- Paste source YAML or JSON — YAML needs consistent space indentation; tabs often fail parsing.
- Pick conversion direction — YAML→JSON for scripts; JSON→YAML for readable deploy files.
- Review types and null — Ensure numbers did not become strings and `null` is not the string `"null"`.
- Save to the repo — Copy into `values.yaml`, workflows, or fixtures — run cluster/CI validation before merge.