Skip to content
HALOWERK

Codewerk

json to types

Feeds up to 100 JSON samples into quicktype-core 26.0.0 and renders type definitions only (TypeScript interfaces, Go structs with json tags, Rust serde structs, Python 3.7 dataclasses). Properties missing in some samples become optional; nulls become nullable; integers and floats are distinguished. Speculative inference is switched off: strings stay strings (no guessing of integer, boolean, date-time or UUID strings) and no enums are invented from sample values. The result reflects only the.

POST https://code.halowerk.com/v1/json-to-types

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
samplesarrayYesJSON values (usually objects) that all represent the same type.
languagestringYesTarget language.
type_namestringNoName of the top-level type.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "samples",
    "language"
  ],
  "properties": {
    "samples": {
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "items": {},
      "description": "JSON values (usually objects) that all represent the same type."
    },
    "language": {
      "type": "string",
      "enum": [
        "typescript",
        "go",
        "rust",
        "python"
      ],
      "description": "Target language."
    },
    "type_name": {
      "type": "string",
      "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$",
      "default": "Root",
      "description": "Name of the top-level type."
    }
  }
}

Open original schema

Published input example

{
  "language": "typescript",
  "type_name": "Product",
  "samples": [
    {
      "id": 1,
      "name": "Lamp",
      "tags": [
        "new"
      ],
      "price": 9.5
    }
  ]
}

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 โ†’