dataclasses-json
dataclasses-json copied to clipboard
recursively ignoring fields that are not json serializable?
Hi,
I'm using a few libraries that aren't readily JSON Serializable, and rather than attempt to write a serializer for every time it shows up, I rather just ignore it. Is there a simple way to do this? I can't seem to find anything in the documents that addresses this.
Best
Hi there.
Could you do something like this?
@dataclass
class EncodeExclude(DataClassJsonMixin):
some_field: str
ignored_field: str = field(metadata=config(exclude=Exclude.ALWAYS))