JSON Transform API

Convert JSON to CSV, XML, YAML, TOML, and back — in one API call.

Endpoints

POST /api/transform

Convert data between formats.

curl -X POST https://production-json-transform.tyzo.nodeops.app/api/transform \
  -H "Content-Type: application/json" \
  -d '{
    "input": "json",
    "output": "yaml",
    "data": {"name": "NK", "skills": ["code", "deploy"]}
  }'

POST /api/flatten

Flatten nested JSON into dot-notation keys.

curl -X POST https://production-json-transform.tyzo.nodeops.app/api/flatten \
  -H "Content-Type: application/json" \
  -d '{
    "data": {"user": {"name": {"first": "NK"}}},
    "delimiter": "."
  }'

POST /api/unflatten

Expand dot-notation keys back into nested objects.

curl -X POST https://production-json-transform.tyzo.nodeops.app/api/unflatten \
  -H "Content-Type: application/json" \
  -d '{
    "data": {"user.name.first": "NK"},
    "delimiter": "."
  }'

POST /api/query

Query JSON data using JMESPath expressions.

curl -X POST https://production-json-transform.tyzo.nodeops.app/api/query \
  -H "Content-Type: application/json" \
  -d '{
    "data": {"users": [{"name": "NK", "role": "admin"}, {"name": "Bob", "role": "user"}]},
    "query": "users[?role==\u0027admin\u0027].name"
  }'

POST /api/diff

Compare two JSON objects and return differences.

curl -X POST https://production-json-transform.tyzo.nodeops.app/api/diff \
  -H "Content-Type: application/json" \
  -d '{
    "original": {"name": "NK", "age": 25},
    "modified": {"name": "NK", "age": 26, "city": "SF"}
  }'

POST /api/validate

Validate JSON data against a JSON Schema.

curl -X POST https://production-json-transform.tyzo.nodeops.app/api/validate \
  -H "Content-Type: application/json" \
  -d '{
    "data": {"name": "NK", "email": "[email protected]"},
    "schema": {
      "type": "object",
      "properties": {
        "name": {"type": "string"},
        "email": {"type": "string", "format": "email"}
      },
      "required": ["name", "email"]
    }
  }'

Supported Formats

FormatInputOutput
JSONObject, array, or JSON stringPretty-printed JSON string
CSVCSV stringCSV string with headers
XMLXML stringXML string with root element
YAMLYAML stringYAML string
TOMLTOML stringTOML string

Error Codes

CodeDescription
INVALID_INPUTMissing or invalid request field
INVALID_FORMATUnsupported format specified
PARSE_ERRORFailed to parse input data
PAYLOAD_TOO_LARGEData exceeds 5MB limit
QUERY_ERRORInvalid JMESPath query
VALIDATION_ERRORSchema validation failed

Powered by CreateOS