skillfed

json-spec

Implements JSON Schema, JSON Pointer and JSON Reference.

json-spec v0.12.0 455.0K downloads/30d#6,563 on PyPI38
Permissive license BSD-3-Clause DORMANT released

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-spec

uv

uv add json-spec

poetry

poetry add json-spec

Installing 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

Development Status :: 4 - BetaEnvironment :: ConsoleEnvironment :: OpenStackIntended Audience :: DevelopersIntended Audience :: Information TechnologyLicense :: OSI Approved :: Apache Software LicenseLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12

Tags

json schema validationjson pointer navigationjson reference resolutionjson document manipulationjson validation libraryjson path extractionjson cli tools
json-validationschema-validationcli-tool

More Utilities packages