Back to browse
GitHub Repository

A scary json validator you should not use. Use is-my-jsonb-valid instead

0 starsPython

Pg-jason-validator fastest JSON schema validation via C Macros

by furstenheim·Jul 14, 2026·3 points·0 comments

AI Analysis

●●●BangerBig BrainWizardryBold Bet

Compiles schemas into C macros for 1.56x speedup over pg_jsonschema.

Strengths
  • Shifts schema parsing from runtime to compilation, eliminating branch prediction misses.
  • Benchmarks show 26k rows/sec vs 16k for the previous best compiled alternative.
  • Macro-based code generation avoids the overhead of generic interpreter loops.
Weaknesses
  • Requires database recompilation for every schema change, killing agility.
  • Author admits AI-generated code and warns of segmentation faults crashing the DB.
Category
Target Audience

PostgreSQL engineers managing high-throughput JSONB validation

Similar To

pg_jsonschema · is-jsonb-valid

Similar Projects

Rusdantic

Pydantic ergonomics for Rust, but validator and garde already exist.

Ship ItCozy
mmgehlot
503mo ago