The input must be valid JSON. This includes objects, arrays, strings, numbers, booleans, and null values. For example,
{
"database": {
"host": "localhost",
"port": 5432,
"credentials": {
"username": "admin",
"password": "secret"
}
}
}The output will be a valid YAML document. For example, the output of the above input will be:
database:
host: localhost
port: 5432
credentials:
username: admin
password: secretThe following inputs will produce an error:
JSON arrays are converted to YAML lists using the - prefix for each item. For
example,
{
"servers": ["web01", "web02", "db01"],
"ports": [80, 443, 5432]
}This produces:
servers: - web01 - web02 - db01 ports: - 80 - 443 - 5432