QuapQuap

Generate code

Create C#, Java, TypeScript and Python classes from JSON, YAML or XML.

Paste an API response and get typed classes for your project. Quap infers types from the values, merges the shapes of array items, and names nested classes after their keys. Code generation works from JSON, YAML and XML documents.

Steps

  1. Open the document and click Conv in the preview toolbar.
  2. Choose → C#, → Java, → TypeScript or → Python.
  3. Set the options (below). The output updates as you change them.
  4. Copy the code.

Options

GroupOptions
PropertyPascalCase names, Use fields instead of properties, Nullable primitives
AttributesJsonProperty (Newtonsoft), NullValueHandling.Ignore, JsonPropertyName (.NET)
ClassImmutable classes, Record types
ListsReadonly lists
ExamplesGenerate examples — adds a usage snippet that deserialises the document

Example

{ "id": 7, "customer": { "name": "Ada", "email": "ada@example.com" }, "tags": ["new"] }
export interface Customer {
  email: string;
  name: string;
}

export interface Root {
  customer: Customer;
  id: number;
  tags: string[];
}

Ask the AI assistant for the same thing in words: "generate TypeScript types for this document".

Accent color