json-schema
A lightweight, historical CommonJS implementation of the original JSON Schema draft specifications
Repository Health
Technical Analysis
json-schema is the original CommonJS implementation of the early JSON Schema draft specifications (draft-00 through draft-04), maintained by Kris Zyp as a stable, frozen reference implementation. Despite being intentionally unmaintained beyond bug-level stability, it remains one of the most heavily depended-upon packages in the npm ecosystem because dozens of tools built on the original JSON Schema drafts still require its validation primitives to remain byte-for-byte consistent over time.
The package exposes a single validate function that checks a JavaScript object instance against a schema object, returning a simple list of {property, message} validation errors. It intentionally does not chase the latest JSON Schema specification versions — that work has moved to the json-schema-org organization — making this package a deliberately “finished” artifact valued for stability rather than active feature development.
What You Get
- A single
validate(instance, schema)function returning{valid, errors}for straightforward object validation - A
checkPropertyChangehelper for validating a single property change against a schema, respectingreadonly - Support for the original draft JSON Schema keywords (type, properties, required, format, etc.)
- The historical draft specification text files (draft-00 through draft-04) bundled directly in the repository
- Zero runtime dependencies, keeping the module tiny and safe to embed transitively
Common Use Cases
- Validating configuration objects or API payloads against legacy JSON Schema draft definitions
- Acting as the underlying validation engine for older tools and frameworks that standardized on this implementation years ago
- Studying or referencing the original JSON Schema draft specification text alongside a working implementation
- Maintaining backward compatibility in long-lived codebases that cannot migrate to newer schema validators without a rewrite
Under The Hood
Architecture - The entire implementation lives in lib/validate.js (~270 lines), a single UMD-wrapped module that exports a validate(instance, schema, options) function plus checkPropertyChange. Validation walks the schema recursively, checking type, properties, required, additionalProperties, format, and related keywords, accumulating {property, message} error objects into a flat list rather than throwing. A companion lib/links.js implements JSON Schema “links” (hyperschema) resolution separately from the core validator, keeping the two concerns decoupled.
Tech Stack - Pure vanilla JavaScript with zero runtime dependencies, written to run equally in Node.js (CommonJS), AMD environments, and directly as a browser global via a UMD wrapper at the top of validate.js. The only devDependency is vows, a now-legacy BDD test framework, reflecting the project’s original-era tooling choices.
Code Quality - Tests exist under test/tests.js and run via vows --spec test/*.js, covering the core validation keywords against the bundled draft schemas. Code style is dense and comment-driven rather than typed or heavily abstracted — there are no TypeScript types, no linter configuration, and error handling is done purely through the returned errors array rather than exceptions, which is idiomatic for the era the library was written in but dated by modern standards.
API Design - The API surface is intentionally minimal: one function to validate, one to check a property change. This makes it trivial to embed but also inflexible — there’s no plugin system, no custom keyword registration, and no async validation support, which is why newer validators (Ajv, Zod) have superseded it for greenfield use even as this package remains load-bearing for legacy dependents.
Used by 15 apps in this directory
nango
Authentication · Automation · Developer Tools
Build product integrations with AI using 800+ APIs — auth, proxy, and TypeScript functions on production-grade infrastructure.
Novu
Developer Tools
Open-source communication infrastructure that connects your products and AI agents to every channel your users live on — Inbox, Email, SMS, Push, Chat, and more.
Portainer
Devops
A lightweight, open-source web UI that puts Docker, Kubernetes, and Podman management within reach of any team—no CLI expertise required.
Rill
Analytics · Data Engineering
The fastest BI tool for humans and agents — define metrics, models, and dashboards as code and query them instantly on ClickHouse or DuckDB.
superglue
AI Agents · Data Engineering · Developer Tools
superglue is an AI-agent-driven integration engine that turns plain-English descriptions of enterprise systems into production-grade API tools, ERP/CRM connectors, and data pipelines — self-hosted or cloud, Y Combinator-backed (W25).
twenty
CRM
The open-source CRM you build, ship, and version like the rest of your stack — with customizable objects, AI agents, and a TypeScript SDK.