JSON Toolkit

Schema and Validation

Describe the shape of your data with JSON Schema, turn verbal agreements into executable validation, and let it drive TypeScript types and form generation in turn.

7 articles

Articles in this category

JSON Schema: From Basics to Production

There are many keywords, but only a dozen are used every day. Get type/properties/required/$ref right, handle error messages well, and you cover eighty percent of real cases.

Intermediate~14 min readUpdated 2026-10-30

Two-Way Sync Between Schema and TypeScript Types

Types and schemas each cover one segment: one at compile time, one at runtime. The question isn't which to pick, but how to keep the two in sync automatically.

Intermediate~11 min readUpdated 2026-10-30

Without additionalProperties, Schema Validation Validates Nothing

A passing validation does not mean clean data. Pydantic ignores unknown fields by default, Zod strips them, and Ajv lets them through — hallucinated parameters and typo'd keys all pass silently. This article shows the three forms of silent acceptance, then gives complete recipes for closing objects, controlling coercion, and tightening every nesting level.

Intermediate~8 min readUpdated 2026-11-02

JSON Schema Contract Testing: Wire Your Validation Rules into CI

A finished schema is where decay begins, not where work ends: one typo silently widens validation, one refactor breaks every fixture. This guide gives a workable contract testing setup — positive, negative, and snapshot fixtures, schema-first linting, compile-once reuse, and four CI gates that turn contract breakage into a red build.

Advanced~8 min readUpdated 2026-11-05