--- id: databind-json version: "4.5.5" license: MIT license_treatment: permissive maintenance: active --- # databind.json — De-/serialize Python dataclasses to or from JSON payloads. Compatible with Python 3.8 and newer. Deprecated, use `databind` module instead. License: permissive · Maintenance: active · Downloads: 246.3K/mo ## 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 above — 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 pip install databind-json uv add databind-json poetry add databind-json ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 246.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags dataclass json serialization, python dataclass deserialization, json to dataclass mapping, type-safe json loading, dataclass configuration loading, nested dataclass json, python type hints json, dataclass-serialization, configuration-loading, type-hints [View on SkillFed](https://skillfed.io/packages/databind-json) · [View on PyPI](https://pypi.org/project/databind-json/)