dataclasses-json
dataclasses-json copied to clipboard
Easily serialize Data Classes to and from JSON
Hi, to_json() doesnt work as expected Please consider the following example ```python from datetime import datetime from dataclasses import dataclass, field from dataclasses_json import dataclass_json @dataclass_json @dataclass class Session: topic:...
If I try to use Marshmallow o.schema().dumps() to serialize vs o.to_json() and o involves nested classes with forward reference, I get an error. ```python from dataclasses import dataclass from dataclasses_json...
So far, mypy will fail on dataclasses_json since it does not provide the stub file (*.pyi)
In the documentation at [https://pypi.org/project/dataclasses-json/](https://pypi.org/project/dataclasses-json/), the section named 'Extending' is supposed to explain how to extend `dataclasses_json` to change the behaviour of certain field types. However, the included example code...
I would like to switch all of my dataclasses to use - isoformat encoding for datetimes - deserialise datetimes as naive format without tzinfo I assume I can make a...
`exlude` accepts a `Callable[[str, Any], bool]` [here](https://github.com/lidatong/dataclasses-json/blob/a5fd1b53b4e9c192a2ecfd851502d056309c36c8/dataclasses_json/cfg.py#L53) But when it is invoked only the value is passed https://github.com/lidatong/dataclasses-json/blob/a5fd1b53b4e9c192a2ecfd851502d056309c36c8/dataclasses_json/core.py#L103
First, dataclasses-json is great! Thanks for the hard work @lidatong and everyone else! Currently dataclasses-json gives a warning if trying to call `schema()` with typing.Literal and no validation is performed....
Hi. Is there any option to encode enums by their name not their value? I.e., is there any options to make this code: ```python from enum import Enum, auto from...
I have an issue where the `dump` function seems to be ignoring the metadata configuration altogether. The Python class: ```python @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass(frozen=True) class InvoicePaymentsResponse: payment_id: str payment_status: Payment.Status invoice_id: str...
### Issue When one of the fields is `Dict` and its key is a hashable dataclass, calling `to_dict()` fails with `TypeError: unhashable type: 'dict'`. ### Example code ```python from dataclasses...