Pikkola Data Studio, tool No. 45

Paste the JSON. Keep the contract.

One payload in, five written shapes out: JSON Schema, TypeScript, Zod, a Go struct and a Python TypedDict. Then the other direction, which is where schemas usually break: a schema on one side, a test payload on the other, and every value that fails named by its path.

5
outputs
0
requests sent
EN · KO · JA
three languages

The four tabs

Read a payload, or check one

Every tab shares one shape and one set of options. No account, no size limit worth worrying about, and nothing leaves the tab.

A value becomes a shape

Paste one object, or an array of rows. Keys that appear in every row stay required, keys that some rows leave out become optional, and a value that is null in one row and a string in another becomes a union of the two.

0 keys

Your JSONobject

Written outJSON Schema

            

What the values gave away0

A format is read from the value itself. The name of the key is never used, so a key called email holding 42 is a number.

How it reads

Three things a sample cannot tell you

Inference is a description of what was seen, not a promise about what will arrive. Knowing where the difference bites is the whole job.

01

Required means seen every time

One object marks every key it holds as required, because it is the only evidence there is. An array of rows is better evidence: a key that two rows carry and one does not becomes optional, and the JSON Schema required list shrinks to the keys that never went missing.

02

Format is read from the value

An email, a UUID, an ISO timestamp and an https address are recognised by their shape, not by the name of the key holding them. That is why a key called created_at with the number 42 comes out as an integer, and why a plain string that looks like neither stays a plain string.

03

An empty array says nothing

An empty array is an array of unknown, and a null is a null until a second value contradicts it. Paste a row that has an item in the array and a string in the nullable field, and both fill in. No tool can invent the shape of a thing it has never seen.

The same shape, one row per writer
Output Written as Where it goes
JSON Schema properties, required, format Contract files, API docs, ajv and every other validator
TypeScript interface, optional members Front end types, SDK shapes, typed fetch results
Zod z.object, .email(), .nullable() Runtime parsing at the edge of a request
Go struct with json tags Services that decode the same payload
Python TypedDict, NotRequired Scripts, notebooks, a typed client

Questions

Is the inferred schema the only right schema for this data?

No. One row describes one case. Any property that appears in that row is marked required, so a second row with a missing key would fail the schema the first row produced. Paste several rows as an array and the keys missing from some of them become optional, which is the closest a sample can come to the truth.

Where do formats such as email, uuid and date-time come from?

They are read from the values, not from the key names. A string that parses as an ISO 8601 timestamp gets format date-time, one shaped like an address gets email, one shaped like a UUID gets uuid, and one starting with http:// or https:// gets uri. A key called created_at holding 42 is still a number, and the writer says so.

What does additionalProperties do?

It decides whether a key the schema does not describe is allowed. Left open, a payload may carry extra keys and still pass. Closed, the validator names each unknown key by path and the JSON Schema output carries additionalProperties false at every object level. The Options tab switches it for all five writers at once.

Why does the validator report a path and not the whole document?

Each error names the value that failed, as a path from the root such as $.items[1].quantity, and the keyword that failed. The rest of the document is still checked, so one run lists every problem instead of stopping at the first one.

Which parts of JSON Schema does the validator understand?

type, required, properties, items, additionalProperties, enum, const, minimum and maximum, exclusiveMinimum and exclusiveMaximum, multipleOf, minLength, maxLength, pattern, format, minItems, maxItems, anyOf, oneOf, allOf, not and local $ref. Remote $ref, unevaluatedProperties and dependentSchemas are not followed, and format is enforced as a check rather than left as an annotation.

Does anything get uploaded?

No. The inference and the validation both run in this tab, the content policy forbids network requests, and there is no server that could receive a payload. Only the language, the theme and the last text you typed are kept in this browser.