Struct tags can't bend
Go's tag validators hard-code the shape at compile time. Third-party payloads and dynamic forms don't fit that mold.
rigidFlatten 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, standard library only. No plugins, no code generation.
Nested documents become dotted keys. Match one literally, sweep an array with *, or use a full regex.
Transform values in a separate pass: trim, capitalize, math, and reshape arrays into objects.
Gate fields with when and dependsOn, composing any, all, and not groups as deep as the rule needs.
Every failure carries a machine-readable code that survives rewording and translation. Never a panic.
Each error knows its RFC 6901 location, and any handler can answer with an RFC 7807 response.
Validate request headers, query, and body per endpoint with the API type, body size capped.
Load per-locale message bundles from JSON or TOML, with fallback chains and ICU-style plurals.
Observer, metrics, and tracing adapters that cost a nil check when nothing is attached.
Validate arrays that do not fit in memory, and check schemas in CI without writing any Go.
Follow the guide, or try a live schema in the playground right now.