Skip to main content

infer_serialize_dataclass

No overview available.

def infer_serialize_dataclass(
obj: Any
) - > dict

Recursively converts a dataclass instance into a dictionary, handling nested dataclasses and collections.

Parameters

NameTypeDescription
objAnyThe dataclass instance or collection to be serialized into a dictionary format.

Returns

TypeDescription
dictA dictionary representation of the dataclass instance with all nested structures serialized.