Flatten any document into dotted keys, target them with wildcards or regex, then run each value through a pipeline of validators and operators. Typed errors, no panics.
go get github.com/ashbeelghouri/json-schematics-v2@latestGo's tag validators hard-code the shape at compile time. Third-party payloads and dynamic forms don't fit that mold.
rigidReflection-heavy validators panic on the value they didn't expect. A bad request shouldn't take down the handler.
unsafeChanging a rule means a redeploy. Schematics keeps rules as JSON, so a schema is data you can load, ship, and localize.
declarativeFive stages, each colored by what it does. Hover to pause, click a stage to inspect it.
Any nested document collapses into dotted keys. Objects and arrays become paths like user.tags.0.
Everything below ships in the box. No plugins, no code generation.
Nested documents become dotted keys. Match one literally, sweep an array with *, or use a full regex.
Every failure is a ValidationError with per-locale messages and clean JSON. Never a panic.
Transform values in a separate pass: trim, capitalize, math, and reshape arrays into objects.
Gate fields with when and dependsOn so rules run only when they actually apply.
Validate request headers, query, and body per endpoint with the API type.
Standard library only, Go 1.24. Register your own rules and operators with typed signatures.
Follow the guide, or try a live schema in the playground right now.