awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
lidatong avatar

lidatong/dataclasses-json

0
View on GitHub↗
1,484 stars·168 forks·Python·MIT·19 views

Dataclasses Json

Dataclasses-json is a library designed to facilitate the bidirectional conversion between Python data classes and JSON formats. It serves as a serialization tool that populates structured objects from raw data and transforms object instances into JSON strings, utilizing Python type hints to automate the mapping process.

The library distinguishes itself by providing mechanisms for schema validation and runtime type coercion, ensuring that incoming data adheres to predefined model structures. It supports complex data requirements through recursive object traversal, which allows for the processing of nested hierarchies, and offers flexible field mapping to reconcile differences between internal naming conventions and external API requirements.

Beyond basic conversion, the library includes utilities for managing unexpected data, such as missing or extraneous fields, through configurable strategies. It also provides an extensible hook system that allows for custom serialization logic, enabling developers to override default transformation behaviors for specialized data types or formats.

Features

  • JSON Serialization Libraries - Provides a library for transforming structured object instances into JSON formats and populating objects from raw data.
  • Streaming-to-Object Conversions - Facilitates bidirectional conversion between structured Python objects and JSON formats, including support for nested hierarchies.
  • Python Dataclass Serialization - Converts complex Python data classes into JSON strings and back into structured objects for storage or transmission.
  • Class Instance JSON Serializers - Converts Python data classes to and from JSON strings while supporting custom field mapping and validation.
  • Marshmallow Schema Integrations - Integrates with Marshmallow schemas to enforce strict type checking and validate incoming data against predefined models.
  • Data Type Coercion - Automatically validates and converts raw input values into expected Python types based on model type hints.
  • Struct Field Mappings - Supports custom field naming conventions to transform between internal snake_case and external camelCase or kebab-case formats.
  • Database Schema Mappings - Decouples internal class attribute names from external JSON field names to support flexible data mapping.
  • Serialization Logic Overrides - Enables precise formatting for specialized data types by overriding default encoding and decoding behaviors.
  • Field Transform Hooks - Provides an extensible hook system to override default transformation logic for specialized data types.
  • Type-Hint-Driven Mapping - Inspects Python type annotations to automatically map data fields to object attributes during serialization.
  • Recursive Object Validation - Recursively traverses nested object hierarchies to process and validate complex data structures.
  • Data Validation Schemas - Enforces schema constraints and manages data integrity during the serialization of complex models.
  • Data Class Decorators - Uses decorators to store serialization rules and configuration directly within data class definitions.
  • Expected and Unexpected Failure Separation - Manages missing or extraneous input data through configurable strategies like default values or catch-all fields.
  • JSON Schema Validation - Enforces data integrity by validating incoming JSON payloads against predefined Python data models.
  • Case-Conversion Mappings - Standardizes field naming between internal models and external API requirements during data exchange.

Star history

Star history chart for lidatong/dataclasses-jsonStar history chart for lidatong/dataclasses-json

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Curated searches featuring Dataclasses Json

Hand-picked collections where Dataclasses Json appears.
  • JSON parser library

Projects sharing features with Dataclasses Json

These projects share indexed features with Dataclasses Json. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • python-attrs/attrspython-attrs avatar

    python-attrs/attrs

    5,799View on GitHub↗

    attrs is a Python library that automatically generates initialization, representation, equality, hashing, and ordering methods from declarative class attribute definitions. At its core, it provides a class decorator metaprogramming framework that intercepts class creation to rewrite the class body, producing dunder methods without manual boilerplate. The library includes a comprehensive attribute validation toolkit with built-in validators for type checks, range constraints, regex matching, length limits, and logical composition of validation rules. The library distinguishes itself through it

    Python
    View on GitHub↗5,799
  • ijl/orjsonijl avatar

    ijl/orjson

    8,110View on GitHub↗

    orjson is a high-performance Python library for serializing and deserializing JSON data. It functions as both a JSON parsing library and a serialization engine, converting data between native Python objects and UTF-8 encoded bytes. The project provides specialized support for converting complex Python data structures, including dataclasses, datetime objects, and NumPy arrays and scalars, into JSON format. It also allows for the insertion of pre-serialized JSON blobs into documents to maintain processing speed. The library includes capabilities for memory-efficient deserialization through key

    Pythondataclassesdatetimedeserialization
    View on GitHub↗8,110
  • julian/jsonschemaJulian avatar

    Julian/jsonschema

    4,951View on GitHub↗

    This project is a Python implementation of the JSON Schema specification, providing a library for verifying that data instances conform to defined schemas. It serves as a data validation framework capable of validating both the data itself and the schemas against official meta-schemas to ensure structural correctness. The library features a schema reference resolver that maps URIs to definitions, enabling the resolution of internal and remote references for modular schema management. It is designed for extensibility, allowing for the definition of custom keywords, custom type-checking logic,

    Python
    View on GitHub↗4,951
  • jsonmodel/jsonmodelJSONModel avatar

    JSONModel/JSONModel

    6,813View on GitHub↗

    JSONModel is a data modeling framework and serialization library for Apple platforms, including iOS, macOS, watchOS, and tvOS. It transforms JSON strings and dictionaries into typed Swift objects to eliminate manual dictionary parsing. The framework provides a mapping system that utilizes custom key rules and dot-notation to resolve nested data hierarchies. It supports the conversion of complex JSON structures into organized model relationships and manages the transformation of JSON arrays into collections of typed model instances. The toolset includes data type transformation via custom tra

    Objective-C
    View on GitHub↗6,813
Compare all 30 related projects→

Frequently asked questions

What does lidatong/dataclasses-json do?

Dataclasses-json is a library designed to facilitate the bidirectional conversion between Python data classes and JSON formats. It serves as a serialization tool that populates structured objects from raw data and transforms object instances into JSON strings, utilizing Python type hints to automate the mapping process.

What are the main features of lidatong/dataclasses-json?

The main features of lidatong/dataclasses-json are: JSON Serialization Libraries, Streaming-to-Object Conversions, Python Dataclass Serialization, Class Instance JSON Serializers, Marshmallow Schema Integrations, Data Type Coercion, Struct Field Mappings, Database Schema Mappings.

Which projects share features with lidatong/dataclasses-json?

Projects with overlapping indexed features include: python-attrs/attrs — attrs is a Python library that automatically generates initialization, representation, equality, hashing, and ordering… ijl/orjson — orjson is a high-performance Python library for serializing and deserializing JSON data. It functions as both a JSON… julian/jsonschema — This project is a Python implementation of the JSON Schema specification, providing a library for verifying that data… json-iterator/go — This project is a high-performance JSON library for Go, serving as a replacement for the standard encoding/json… jsonmodel/jsonmodel — JSONModel is a data modeling framework and serialization library for Apple platforms, including iOS, macOS, watchOS,… tristanhimmelman/objectmapper — ObjectMapper is a JSON serialization framework for Swift that maps JSON strings and dictionaries into strongly typed…