JSON / YAML Converter
Convert JSON to YAML and simple block YAML back to JSON, with validation and formatting - useful when the same config exists in both forms.
Result
hostname: bng-edge-01
loopback: 10.255.0.1
bgp:
asn: 65001
peers:
- 192.0.2.2
- 192.0.2.6
enabled: true{
"hostname": "bng-edge-01",
"loopback": "10.255.0.1",
"bgp": {
"asn": 65001,
"peers": [
"192.0.2.2",
"192.0.2.6"
]
},
"enabled": true
}About JSON / YAML Converter
Network automation lives in both formats: APIs speak JSON, Ansible and Kubernetes speak YAML, and the same device inventory often has to exist in both. This converts between them with validation, in the browser.
Where automation tooling expects each format
Device APIs, RESTCONF and NETCONF-over-JSON gateways speak JSON. Ansible inventories and playbooks, Kubernetes manifests, GitLab and GitHub pipelines, and Netplan all use YAML. That split means the same device inventory frequently exists in both, and hand-converting is where drift is introduced. Converting mechanically also normalises formatting, which makes a subsequent diff show real changes rather than reindentation noise.
YAML gotchas worth knowing
YAML's type inference is aggressive. Unquoted yes, no, on and off become booleans - the notorious "Norway problem" where the country code NO becomes false. Leading zeros can be read as octal, and version strings like 1.10 become the number 1.1. Quote any string whose meaning matters, which for network data means interface names, VLAN lists and version numbers.
Common use cases
- Turning an API response into a YAML fragment for an automation repository.
- Validating a YAML inventory file before a playbook run.
- Reformatting minified JSON into something reviewable.
Edge cases and gotchas
- Tabs are illegal for indentation in YAML - always spaces.
- JSON has no comments; converting YAML to JSON discards them silently.