databind.json
De-/serialize Python dataclasses to or from JSON payloads. Compatible with Python 3.8 and newer. Deprecated, use `databind` module instead.
What it is and what it does
databind.json is a (de)serialization framework designed for flexible configuration loading from JSON-like nested data structures. It maps between Python dataclasses and dictionaries, automatically handling native types (int, str, bool, etc.), standard library types (Enum, Decimal, UUID, Path, datetime, date, time, timedelta), and generic types like lists and unions. The package supports multiple union serialization modes, runtime type checking, and customization through global settings, class-level decorators, or type-hint annotations.
The package explicitly prioritizes ease of use and flexibility over performance—if you need high-speed serialization, the documentation recommends alternatives like mashumaro. It's intended primarily for configuration loading workflows where you want to load structured data into typed Python objects without boilerplate, and it handles nested dataclasses, field flattening, and extra-key collection out of the box.
Use it for:
- Load configuration files (JSON, YAML-converted-to-dict) into typed dataclass objects with automatic type validation.
- Deserialize API responses into dataclass instances while preserving type safety and handling nested structures.
- Serialize dataclass instances back to JSON-compatible dictionaries for storage or transmission.
- Handle union types and multiple serialization modes (nested, flat, keyed, Literal) in complex data schemas.
- Customize field names and serialization behavior per-field using Annotated type hints without modifying dataclass definitions.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Deserializes and serializes Python dataclasses to and from JSON-like nested data structures, supporting native Python types, enums, dates, UUIDs, and generic types with customizable serialization behavior.
Yes, if you need flexible, type-safe JSON deserialization into dataclasses with minimal setup. The package is actively maintained, has no known vulnerabilities, and low install friction. Not recommended if performance is critical—the maintainers explicitly direct high-speed use cases elsewhere. The package is marked deprecated in favor of the `databind` module, so verify that the newer package meets your needs before committing to this one.
Install
databind-json on PyPI
pip
pip install databind-jsonuv
uv add databind-jsonpoetry
poetry add databind-jsonInstalling databind.json
Before you install
Low friction: pure Python wheel with a single runtime dependency (databind). Last release 84 days ago with active repository status.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install databind.json
from dataclasses import dataclass
from databind.json import load, dump
@dataclass
class Config:
host: str
port: int
data = {"host": "localhost", "port": 8080}
config = load(data, Config)
result = dump(config, Config)
Requires Python 3.8 or newer; does not support Python 3.6 or 3.7.
Verify before relying
- Performance characteristics relative to alternatives when handling large payloads or deeply nested structures.
- Whether the package handles circular references or self-referential dataclass definitions.
- Extent of validation and error reporting when encountering malformed or type-mismatched input data.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — databind |
| Maintenance | actively maintained — 84 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 246,287/month — #8,712 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: databind_json-4.5.5-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
databindDatabind deserializes JSON-like nested data…
permissive · top 15,000 on PyPI
databind.coreDeserializes and serializes Python dataclasses…
permissive · top 15,000 on PyPI
dataclass-factoryConverts dataclasses to and from dictionaries…
permissive · top 15,000 on PyPI
dataclass-wizardDataclass Wizard converts Python dataclasses to…
permissive · top 5,000 on PyPI
json-strong-typingSerializes Python dataclasses to JSON and…
permissive · top 15,000 on PyPI
jsonsConverts Python objects (dataclasses, attrs…
permissive · top 5,000 on PyPI
pyserdeSerialize and deserialize Python dataclasses to…
permissive · top 5,000 on PyPI
serpyco-rsSerializes and deserializes Python dataclasses…
permissive · top 15,000 on PyPI
typedloadLoads and dumps JSON-like data into typed…
copyleft · top 1,000 on PyPI
jax-dataclassesProvides a JAX-compatible wrapper around Python…
permissive · top 15,000 on PyPI