dataclasses-json icon indicating copy to clipboard operation
dataclasses-json copied to clipboard

Easily serialize Data Classes to and from JSON

Results 166 dataclasses-json issues
Sort by recently updated
recently updated
newest added

### Description I have a Message json dataclass that has a field namely "record" that can be dataclass Record1, Record2, or Record3. The code fails trying to infer record with...

bug

### Description I already have (flask) Schema classes defined: ```python class UserIn(Schema): """Fields for user when requesting a new account in admin.""" username = fields.Str( required=True, validate=validate.Length(min=4, max=254) ) password...

enhancement

### Description My usecase requires me to work with initvars and override the to_dict method slightly. Each time I convert my obj to dict, I need to replace a protected...

bug

### Description The "Supported types" documentation is not up to date. It states that Python 3.6 is supported and maybe the list of supported types needs to extended. I do...

bug
code/docs

### Description In v0 [this PR](https://github.com/lidatong/dataclasses-json/pull/375) aligned lib behaviour with marshmellow, but effectively triggered a couple of unexpected consequences: - People using `from_json` will start noticing builtin types being implicitly...

enhancement
api/v1

Fixes #461 Updates git config to use `autocrlf=input` before running a checkout action on all workflows

Fixes #270 Fixing case where multiple fields have the same field name by inverting the map holding the field name overrides

Currently, if we use a custom encoder on a nested dataclass, it is not called during serialization. This pull request fixes it, with associated test cases. As my use case...

### Description Let's say I register a custom encoder/decoder for type `T` in the `global_config`. I would expect that a `dataclass` with a field of type `Optional[T]` to use the...

bug
api/v0

### Description I was browsing the project documentation and noticed that all source code snippets have an extra newline after each normal line. This is usually caused by some software...

bug