json-spec
Implements JSON Schema, JSON Pointer and JSON Reference.
What it is and what it does
json-spec is a library and CLI tool that implements three JSON specifications: JSON Schema for validation, JSON Pointer for navigating document paths, and JSON Reference for resolving references within JSON structures. It provides both a programmatic API for Python scripts and command-line commands (json add, json check, json copy, json extract, json move, json remove, json replace, json validate) for JSON document manipulation.
The library works with Python 3.10 and above and has minimal dependencies, making it straightforward to install. You can use it to validate data against schemas, extract nested values by path, resolve cross-references, and transform JSON documents. Optional extras like [cli] and [ip] enable additional features such as colorized output and IP format support for JSON Schema.
Use it for:
- Validate incoming API payloads or configuration files against a JSON Schema before processing.
- Extract specific nested values from large JSON documents using JSON Pointer paths.
- Resolve $ref references in JSON documents to follow and validate linked schemas.
- Transform JSON documents via CLI commands (add, remove, replace, move) in shell scripts or pipelines.
- Test JSON data structures programmatically in unit tests using schema validation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Implements JSON Schema, JSON Pointer, and JSON Reference specifications to validate, navigate, and resolve JSON documents programmatically or via CLI.
Yes, if you need JSON Schema validation or JSON Pointer/Reference support and can tolerate dormant maintenance. The low install friction, permissive license, no known vulnerabilities, and stable API make it suitable for established projects. Not recommended if you require active maintenance or expect frequent updates to JSON specification support.
Install
json-spec on PyPI
pip
pip install json-specuv
uv add json-specpoetry
poetry add json-specInstalling json-spec
Before you install
Low friction installation with a single runtime dependency (importlib-metadata). Dormant maintenance status—last release 2024-04-29, last commit 2024-06-12—means no active development but the codebase remains stable and archived repository is not flagged.
License in practice
BSD-3-Clause permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and retain copyright notices.
Quickstart
pip install json-spec
from jsonspec.pointer import extract
obj = {'foo': ['bar', 'baz', 'quux']}
result = extract(obj, '/foo/1')
Verify before relying
- Whether the dormant maintenance status affects long-term compatibility with future Python versions beyond 3.12.
- Performance characteristics when validating large or deeply nested JSON documents.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — importlib-metadata |
| Maintenance | dormant — 837 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 455,004/month — #6,563 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: json_spec-0.12.0-py3-none-any.whl
Keywords: json, utilitaries, validation, json-pointer, json-reference, json-schema
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
jsonpointerResolves JSON Pointers according to RFC 6901,…
permissive · top 1,000 on PyPI
jsonschema2mdConverts JSON Schema files to human-readable…
permissive · top 5,000 on PyPI
json-ref-dictProvides a dict-like interface to JSONSchema…
permissive · top 15,000 on PyPI
jmespathJMESPath is a query language for extracting and…
permissive · top 100 on PyPI
python-jsonpathImplements RFC 9535-compliant JSONPath query…
permissive · top 5,000 on PyPI
jsonmergeMerges multiple JSON documents into a single…
permissive · top 5,000 on PyPI
check-jsonschemaA command-line tool and pre-commit hook that…
permissive · top 5,000 on PyPI
jschonValidates JSON data against JSON Schema (drafts…
permissive · top 15,000 on PyPI
jsonata-pythonEvaluates JSONata expressions against JSON…
permissive · top 5,000 on PyPI
openjd-modelParses, validates, and constructs Open Job…
permissive · top 15,000 on PyPI