Your Kubernetes manifest is YAML. Your API wants JSON. Here is the conversion, done right
Every developer who has touched Kubernetes, Docker Compose, or a GitHub Actions workflow has hit the same small wall. The config lives in YAML. The tool that needs to consume it, validate it, or pipe it through jq only speaks JSON. So you convert it. And the conversion is where quiet bugs are born.
YAML is not JSON with nicer formatting
It looks like it. Both describe nested maps and lists. But YAML has opinions JSON does not. A bare yes is a boolean in YAML 1.1 and a string in YAML 1.2. on and off have the same split personality. A timestamp like 2026-11-08 can silently become a date object in one parser and stay a string in another. Anchors ( &defaults ) and aliases ( *defaults ) let one block appear in five places, and merge keys ( << ) fold shared config into a service definition.…