Skip to main content

typed_dict_json

No overview available.

def typed_dict_json(
data: TypedDict
) - > dict

Converts a TypedDict instance into a JSON-serializable dictionary by recursively processing nested structures.

Parameters

NameTypeDescription
dataTypedDictThe TypedDict instance or dictionary-like object to be converted into a JSON-compatible format.

Returns

TypeDescription
dictA dictionary containing only JSON-compatible types (strings, numbers, booleans, nulls, lists, and dicts).