json-schema

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

Library
npm
v0.4.0
529stars
Custom / Unknown

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
39/100Needs Attention
Development Activity0
Maintenance0
Community76
Maturity60
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
43/100Fair
Architecture45
Code Quality40
Innovation30
Learning Curve55

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
72%
AGPL 3.0

APITable

Low Code Platforms · Databases

15,526

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
53
Repo Health
77
Technical
60
Dependency
Built with
TypeScript72%
Java22%
Updated 9 months ago
Other

Akaunting

Invoicing Finance

10,070

Open-source online accounting for small businesses and freelancers — invoices, expenses, and reporting without monthly fees or vendor lock-in.

View details
98
Repo Health
73
Technical
63
Dependency
Updated yesterday
TypeScript
96%
Other

Amplication

Developer Tools · AI Code Assistants · Automation

16,010

Create production-ready backend services with your organization's standards baked in — generating NestJS, Prisma, and GraphQL code that you own and control.

View details
61
Repo Health
84
Technical
60
Dependency
Built with
TypeScript96%
Updated 1 months ago
TypeScript
99%
AGPL 3.0

Cherry Studio

AI Assistants

50,753

All-in-one AI desktop client with 300+ assistants and multi-model support

View details
88
Repo Health
84
Technical
71
Dependency
Built with
TypeScript99%
Updated today
TypeScript
84%
Apache 2.0

Continue

Developer Tools · AI Development · AI Code Assistants

35,532

Open-source coding agent for VS Code, JetBrains, and CLI with support for 30+ LLM providers.

View details
87
Repo Health
88
Technical
65
Dependency
Built with
TypeScript84%
Updated today
TypeScript
75%
Apache 2.0

Fern

Developer Tools

3,761

Fern turns a single OpenAPI, AsyncAPI, or Protobuf definition into type-safe SDKs for nine languages and a hosted API documentation site, all from one CLI and one source of truth.

View details
90
Repo Health
86
Technical
67
Dependency
Built with
TypeScript75%
Updated today
TypeScript
99%
Apache 2.0

Mastra Code

AI Code Assistants

27,294

"A coding agent that never compacts" — a terminal-based AI coding agent built on the Mastra framework, with Observational Memory instead of context compaction, multi-model support, and OAuth login for Claude Max or ChatGPT Plus.

View details
88
Repo Health
73
Technical
66
Dependency
Built with
TypeScript99%
Updated today
TypeScript
86%
MIT

medusa

Ecommerce

35,900

The most flexible open-source commerce platform — build B2C, B2B, and marketplace applications with modular, composable commerce primitives.

View details
94
Repo Health
87
Technical
65
Dependency
Built with
TypeScript86%
JavaScript14%
Updated today
TypeScript
92%
Other

n8n

Automation · No Code Platforms

201,152

Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.

View details
95
Repo Health
87
Technical
66
Dependency
Built with
TypeScript92%
Updated today

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

Search