~/json-yaml-converter

Convert a Helm values.yaml between YAML and JSON

A Helm chart values.yaml file converted to JSON. Useful when integrating Helm releases with tools that emit JSON (Pulumi, Terraform Helm provider).

# context

Helm uses Go templating over YAML values. The values file itself is plain YAML 1.2-ish (Helm uses gopkg.in/yaml.v3). Converting to JSON is useful when you need to pass values to a non-Helm tool — Pulumi's helm.Release, Terraform's helm_release, or an audit script.

# sample (JSON)

{
  "replicaCount": 3,
  "image": {
    "repository": "nginx",
    "tag": "1.27",
    "pullPolicy": "IfNotPresent"
  },
  "service": {
    "type": "ClusterIP",
    "port": 80
  },
  "ingress": {
    "enabled": true,
    "className": "nginx",
    "hosts": [
      {
        "host": "app.example.com",
        "paths": [{ "path": "/", "pathType": "Prefix" }]
      }
    ]
  },
  "resources": {
    "requests": {
      "memory": "128Mi",
      "cpu": "100m"
    }
  }
}

→ Open in JSON ↔ YAML converter (pre-filled)

# notes

# other examples