Page title

Section title

JSON Typedef Documentation

Welcome to the JSON Typedef online documentation!

JSON Type Definition, aka RFC 8927, is an easy-to-learn, standardized way to define a schema for JSON data. You can use JSON Typedef to portably validate data across programming languages, create dummy data, generate code, and more.

Here, you will find articles teaching you how JSON Typedef works, and how you can use it in your own applications. To start with, here are some recommended articles if you’re just getting started:

Learn JTD Quickly

Everything you need to know about JTD, explained briskly. JTD in 5 Minutes

Start Validating

Start using JTD in your preferred programming language. Implementations

Generate Code

Convert a JTD schema into native types in your programming language. jtd-codegen

The three articles above are recommended because they cover the main way JSON Type Definition is typically used:

  1. First, you describe your data by writing a JTD schema. That’s what JTD in 5 Minutes is all about.

  2. Then, you validate inputs against that schema. For that, you’ll usually need one of the libraries listed in Implementations.

  3. Once you do the runtime checking of JSON inputs, you want to deserialize that validated input into a native type. That’s where jtd-codegen comes in: it maps what a JTD schema can check into the corresponding static type in your programming language.

These are by no means the only way to use JSON Typedef. Other topics covered by this documentation include:

All of the docs you see here are open-source and maintained on GitHub. Please open an issue or pull request on the repo if you have questions or suggestions!