demjson3
encoder, decoder, and lint/validator for JSON (JavaScript Object Notation) compliant with RFC 7159
What it is and what it does
demjson3 is a Python 3-only JSON library that provides encoding, decoding, and strict validation of JSON data. It includes a jsonlint command-line tool for checking JSON files against the JSON specification and detecting portability issues like leading zeros in numbers, duplicate object keys, and integers larger than 53 bits. Unlike Python's built-in json module, demjson3 offers more detailed error reporting, can parse lenient JavaScript-like syntax (comments, unquoted keys), automatically uses Python's Decimal class to avoid floating-point precision loss, and handles Unicode encoding more conservatively for better data portability.
The package is a Python 3-only fork of the original demjson project, dropping Python 2 support. It has no external runtime dependencies and can be used either as an importable module or via the bundled jsonlint script. However, the project is abandoned: the last release was in October 2022, and there is no active maintenance or support.
Use it for:
- Validate JSON files for strict RFC 7159 compliance and detect common portability issues before deployment.
- Parse JavaScript-like JSON with comments or unquoted keys in non-strict mode for lenient input handling.
- Ensure numeric precision by automatically promoting large integers and floats to Python Decimal to avoid overflow.
- Pretty-print or reformat JSON documents with customizable indentation and whitespace handling.
- Integrate strict JSON linting into build pipelines or data processing workflows via the jsonlint command.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
demjson3 encodes, decodes, and validates JSON data with strict error checking and a jsonlint command-line tool for detecting JSON specification violations and data portability issues.
No. The package is abandoned (last release October 2022, 1392 days ago) with no active maintenance. Python's built-in json module handles standard JSON encoding and decoding adequately for most use cases. Install demjson3 only if you specifically need its advanced error checking, lenient JavaScript parsing, or Decimal precision features and can accept the risk of no future updates or security patches.
Install
demjson3 on PyPI
pip
pip install demjson3uv
uv add demjson3poetry
poetry add demjson3Installing demjson3
Before you install
High install friction: the package is abandoned (last release 1392 days ago) and requires manual installation via setup.py or direct file copy, with no active maintenance or support.
License in practice
Licensed under GNU LGPL 3.0 (copyleft), which requires derivative works to remain open-source and may impose obligations on proprietary projects that link or bundle this code.
Quickstart
pip install demjson3
import demjson3
demjson3.encode(['one', 42, True, None])
demjson3.decode('["one",42,true,null]')
No runtime dependencies, but package is abandoned with no active maintenance since October 2022.
Verify before relying
- Whether the package works reliably on Python versions beyond 3.9 (classifiers list only up to 3.9).
- Current status of the upstream demjson project and whether demjson3 remains compatible with its evolution.
- Whether jsonlint output formatting issues mentioned in version 2.2.4 remain resolved in 3.0.6.
Package facts
| License | GNU LGPL 3.0 (copyleft) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,392 days since the last release |
| First released | |
| Downloads | 594,367/month — #5,844 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: demjson3-3.0.6.tar.gz
Keywords: JSON, jsonlint, JavaScript, UTF-32
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
dirtyjsonParses JSON-like data from files containing…
permissive · top 5,000 on PyPI
simplejsonsimplejson encodes Python objects to JSON and…
permissive · top 1,000 on PyPI
standardjsonProvides a JSON encoder that handles datetime,…
permissive · top 15,000 on PyPI
chompjsParses JavaScript objects embedded in HTML or…
permissive · top 15,000 on PyPI
canonicaljsonEncodes Python objects to canonical JSON with…
permissive · top 15,000 on PyPI
check-jsonschemaA command-line tool and pre-commit hook that…
permissive · top 5,000 on PyPI
fastjsonschemaValidates JSON data against JSON Schema…
permissive · top 1,000 on PyPI
dmiparserParses dmidecode output into structured Python…
permissive · top 15,000 on PyPI
asn1Encodes and decodes ASN.1 data structures using…
permissive · top 5,000 on PyPI
strict-rfc3339Converts Unix timestamps to and from RFC3339…
copyleft · top 5,000 on PyPI