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:
The three articles above are recommended because they cover the main way JSON Type Definition is typically used:
-
First, you describe your data by writing a JTD schema. That’s what JTD in 5 Minutes is all about.
-
Then, you validate inputs against that schema. For that, you’ll usually need one of the libraries listed in Implementations.
-
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:
-
Guidance on how to use tooling around JSON Typedef, such as:
-
jtd-infer
, which can generate a schema from examples of your data. -
jtd-fuzz
, which can generate mock data from a schema. -
jtd-validate
, which you can use to validate data from the command-line, or in shell scripts.
-
-
Explanations and best practices around more advanced use-cases for JSON Type Definition, such as:
All of the docs you see here are open-source and maintained on GitHub. Please open an issue or pull request on the jsontypedef.com repo if you have questions or suggestions!
Section title
-
-
-
-
Tooling
-
Advanced Concepts
-
Language-Specific Documentation