Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

AI glossary

JSON Schema

JSON Schema is a standard way to describe the shape of JSON data, its fields, types and required values, so it can be checked automatically.

A schema says, for example, that an object has a string "name", an integer "age" of at least zero, and that "name" is required. A validator then accepts or rejects any JSON against it.

In AI work schemas appear twice: to tell a model what shape to reply in, and to describe the arguments of a tool so a model knows how to call it and your code can refuse a bad call.

A schema the model was shown is a request, not a guarantee. Validate every reply in code, because a model can still leave out a field or invent one.

Learn it hands-on

These free lessons teach it with commands to run in a lab and checked tasks. Read them whole with no account.

← All AI terms