json-schema

A lightweight, historical CommonJS implementation of the original JSON Schema draft specifications

Library
npm
v0.4.0
530 stars
Custom / Unknown

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
39 /100 Needs Attention
Development Activity 0
Maintenance 0
Community 76
Maturity 60
Momentum 20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
43 /100 Fair
Architecture 45
Code Quality 40
Innovation 30
Learning Curve 55

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 checkPropertyChange helper for validating a single property change against a schema, respecting readonly
  • 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

TypeScript
97%
Other

nango

Authentication · Automation · Developer Tools

12,963

Build product integrations with AI using 800+ APIs — auth, proxy, and TypeScript functions on production-grade infrastructure.

View details
94
Repo Health
85
Technical
67
Dependency
Built with
TypeScript 97%
Updated 1 weeks ago
TypeScript
98%
Other

Novu

Developer Tools

40,195

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.

View details
93
Repo Health
80
Technical
64
Dependency
Built with
TypeScript 98%
Updated 6 days ago
TypeScript
51%
ZLIB

Portainer

Devops

38,707

A lightweight, open-source web UI that puts Docker, Kubernetes, and Podman management within reach of any team—no CLI expertise required.

View details
93
Repo Health
79
Technical
65
Dependency
Built with
TypeScript 51%
Go 38%
Updated 1 weeks ago
Go
40%
Apache 2.0

Rill

Analytics · Data Engineering

2,962

The fastest BI tool for humans and agents — define metrics, models, and dashboards as code and query them instantly on ClickHouse or DuckDB.

View details
88
Repo Health
88
Technical
64
Dependency
Built with
Go 40%
TypeScript 38%
Svelte 21%
Updated 6 days ago
TypeScript
96%
Other

superglue

AI Agents · Data Engineering · Developer Tools

2,066

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).

View details
42
Repo Health
79
Technical
67
Dependency
Built with
TypeScript 96%
Updated 2 months ago
TypeScript
84%
Other

twenty

CRM

59,615

The open-source CRM you build, ship, and version like the rest of your stack — with customizable objects, AI agents, and a TypeScript SDK.

View details
92
Repo Health
82
Technical
64
Dependency
Built with
TypeScript 84%
MDX 14%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers