typing-json
Type-aware Python JSON serialization and validation.
What it is and what it does
typing_json wraps Python's standard json module to add type awareness during serialization and deserialization. Instead of returning plain dictionaries and lists, it validates decoded JSON against a provided type annotation and raises TypeError if the data doesn't match. It supports a broad range of types—JSON primitives, Decimal, typed collections (List, Dict, Set, Tuple, etc.), TypedDict, NamedTuple, Literal, Union, Optional, and enums—making it useful when you want to deserialize JSON into statically typed Python objects with runtime guarantees.
The package provides three pairs of functions mirroring the standard library: dump/load for file I/O, dumps/loads for strings, and to_json_obj/from_json_obj for in-memory conversion. It also includes is_instance, which extends isinstance to handle all supported types. The main use case is ensuring that JSON data loaded into a statically typed application (e.g., one checked with mypy) conforms to its declared types at runtime.
Use it for:
- Deserialize JSON API responses into typed dataclasses or TypedDict with automatic validation.
- Load configuration files as typed structures and catch schema mismatches at runtime.
- Serialize complex Python objects with nested typed collections back to JSON reliably.
- Validate JSON data against type specifications in applications using static type checkers.
- Convert JSON with Decimal values to typed structures while controlling int/float casting.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type-aware JSON serialization and deserialization with runtime type validation, extending Python's built-in json module to work with typed collections, Decimal, Literal, Union, Optional, and TypedDict.
No. The package is abandoned (last release 2067 days ago) with no active maintenance. While it has low install friction and permissive licensing, the lack of updates means unfixed bugs, no support for modern Python features, and no security patches. For new projects, use a maintained alternative like pydantic or msgspec; for existing code already relying on typing_json, consider migrating.
Install
typing-json on PyPI
pip
pip install typing-jsonuv
uv add typing-jsonpoetry
poetry add typing-jsonInstalling typing-json
Before you install
Low install friction with a single lightweight dependency (typing-extensions). However, the package is abandoned as of 2067 days since last release; no active maintenance or security updates should be expected.
License in practice
Licensed under MIT (permissive), so you can use it freely in commercial and open-source projects without restriction, though you must include the license notice.
Quickstart
from typing import Dict
from typing_json import loads
data = loads('{"key": "value"}', Dict[str, str])
print(data)
Requires Python 3.7 or later; typing-extensions must be installed as a runtime dependency.
Verify before relying
- Whether the package works correctly with Python versions beyond 3.7 despite classifier listing only 3.7.
- Whether abandoned status means known bugs or incompatibilities with modern Python versions remain unfixed.
- Real-world performance characteristics when handling large or deeply nested typed structures.
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — typing-extensions |
| Maintenance | abandoned — 2,067 days since the last release |
| First released | |
| Downloads | 109,955/month — #12,490 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: typing_json-0.1.3-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
jsonaliasProvides a recursive type alias for…
permissive · top 5,000 on PyPI
numeraryProvides runtime-checkable protocols and type…
permissive · top 15,000 on PyPI
typedloadLoads and dumps JSON-like data into typed…
copyleft · top 1,000 on PyPI
undictifyEnforces type annotations at runtime by…
permissive · top 15,000 on PyPI
dynamodb-jsonConverts Python objects to and from DynamoDB's…
unclear · top 5,000 on PyPI
databind.jsonDeserializes and serializes Python dataclasses…
permissive · top 15,000 on PyPI
amazon-ionParses and serializes Amazon Ion, a…
permissive · top 5,000 on PyPI
type-enforcedEnforces Python type annotations at runtime…
permissive · top 15,000 on PyPI
json-tricksExtends Python's JSON serialization to handle…
permissive · top 15,000 on PyPI
databind.coreDeserializes and serializes Python dataclasses…
permissive · top 15,000 on PyPI