dlt.common.json
JsonSerializable
Type representing a JSON-serializable object.
JsonEncoder
A callable that takes an object and returns a JSON-serializable representation of it.
Should raise TypeError
if the object cannot be serialized.
custom_pua_remove
def custom_pua_remove(obj: Any) -> Any
Removes the PUA data type marker and leaves the correctly serialized type representation. Unmarked values are returned as-is.
may_have_pua
def may_have_pua(line: bytes) -> bool
Checks if bytes string contains pua marker
SupportsJson Objects
class SupportsJson(Protocol)
Minimum adapter for different json parser implementations
set_custom_encoder_impl
def set_custom_encoder_impl(encoder: JsonEncoder) -> None
This is passed through to each SupportsJson implementation and mutates the global custom encoder.