ToyTools Guide

What a JSON Example Can Tell a Schema

Draft a schema from the types in one JSON example. Required fields are not inferred. Runs entirely on your device. Nothing is uploaded.

4 min read Updated Sep 2026

Quick Answer

A JSON schema generator here is an example schema. What can one JSON example tell a schema? The json types that appear, and the object properties that appear. A string example is not a format.

Open JSON to JSON Schema →

Why it matters

For example, a minified payload is hard to check by eye. A schema of the types lets you see the shape before you write the checks yourself.

How it works

How to draft a schema from a sample payload: paste one JSON value. What is an integer versus a number here? A whole number is integer. A fraction is number. How to read an empty array in the result: the type is array, and items is absent, because the example showed no elements.

A type from an example vs a required field: presence in one object does not mean required. JSON Schema vs JSON validation is the next page. This one only drafts the types.

Common Mistakes

You May Also Need

You may also need

Alternatives

Continue Learning