data

Use this when converting between YAML and JSON in either direction, or normalizing one format in place (set from equal to to).

Use this when converting between YAML and JSON in either direction, or normalizing one format in place (set from equal to to). Deterministic: same input, same output. Parses a single YAML document and caps alias expansion at 100 to defuse billion-laughs bombs; multi-document input, tabs-as-indentation, and other parse errors return a typed error with the line number. Example: { data: "name: web\nport: 8080", from: "yaml", to: "json" } -> { result: "{\n "name": "web",\n "port": 8080\n}" }.

post/v1/convert_yaml

Request

  • Base URL: https://api.clean.tools
  • URL: https://api.clean.tools/v1/convert_yaml
  • Auth: none declared

Request body

datastring required

The document to convert, as a string.

from'yaml' | 'json' required

Input format of data.

to'yaml' | 'json' required

Output format; if equal to "from", the document is normalized (parsed and re-emitted).

Response

Structured tool result.

toolstring

Changes

No recorded changes to this operation across all 1 revision of this API.