Skip to content
HALOWERK

Formatwerk

json yaml toml

Reads JSON (exact big integers), JSONC (jsonc-parser), YAML 1.2 (yaml package, one document, alias limit 100, YAML 1.1 merge keys resolved) or TOML 1.0.0 with an own parser that accepts all 208 valid and rejects all 509 invalid TOML 1.0.0 cases of the toml-test suite (commit 96fd088, 2026-11-01). Comments are attached to the following key or array element, or kept as trailing comments on the same line, and written again for JSONC, YAML and TOML; JSON cannot hold comments, so they are counted.

POST https://format.halowerk.com/v1/json-yaml-toml

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
contentstringYesSource document text.
fromstringYesSource format.
tostringYesTarget format (the same format re-formats the document).
indentintegerNoIndentation for JSON/JSONC/YAML output.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "content",
    "from",
    "to"
  ],
  "properties": {
    "content": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000000,
      "description": "Source document text."
    },
    "from": {
      "type": "string",
      "enum": [
        "json",
        "jsonc",
        "yaml",
        "toml"
      ],
      "description": "Source format."
    },
    "to": {
      "type": "string",
      "enum": [
        "json",
        "jsonc",
        "yaml",
        "toml"
      ],
      "description": "Target format (the same format re-formats the document)."
    },
    "indent": {
      "type": "integer",
      "minimum": 1,
      "maximum": 8,
      "default": 2,
      "description": "Indentation for JSON/JSONC/YAML output."
    }
  }
}

Open original schema

Published input example

{
  "content": "# Service\nserver:\n  host: halowerk.com # public name\n  port: 8080\n",
  "from": "yaml",
  "to": "toml"
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’