jetblack_serialization¶
module jetblack_serialization.json ¶
Summary¶
JSON Serialization
function jetblack_serialization.json.deserialize ¶
Summary¶
Convert JSON to an object
jetblack_serialization.json.deserialize(
) -> Any
text: str | bytes | bytearray,
annotation: Annotation,
config: SerializerConfig,
decode: JSONDecoder | None
Parameters¶
text: str | bytes | bytearrayThe JSON string
The type annotation
The serializer configuration
function jetblack_serialization.json.deserialize_typed ¶
Summary¶
Convert JSON to an object
jetblack_serialization.json.deserialize_typed(
) -> Any
text: Union[str, bytes, bytearray],
annotation: str,
config: jetblack_serialization.config.SerializerConfig | None,
decode: JSONDecoder | None
Parameters¶
text: Union[str, bytes, bytearray]The JSON string
The type annotation
function jetblack_serialization.json.deserialize_untyped ¶
Summary¶
Deserialize JSON without type information
jetblack_serialization.json.deserialize_untyped(
) -> Any
text: str | bytes | bytearray,
config: jetblack_serialization.config.SerializerConfig | None,
decode: JSONDecoder | None
Parameters¶
text: str | bytes | bytearrayThe JSON string
function jetblack_serialization.json.from_json_value ¶
Summary¶
Convert from a json value
jetblack_serialization.json.from_json_value(
) -> Any
json_value: Any,
annotation: Annotation,
config: SerializerConfig
Parameters¶
json_value: AnyThe JSON value
The type annotation
The serializer configuration
function jetblack_serialization.json.serialize ¶
Summary¶
Convert the object to JSON
jetblack_serialization.json.serialize(
) -> str
obj: Any,
annotation: Annotation,
config: SerializerConfig,
encode: JSONEncoder | None
Parameters¶
obj: AnyThe object to convert
The type annotation
The serializer configuration
function jetblack_serialization.json.serialize_typed ¶
Summary¶
Serialize an object to JSON
jetblack_serialization.json.serialize_typed(
) -> str
python_obj: Any,
annotation: Annotation,
config: jetblack_serialization.config.SerializerConfig | None,
encode: JSONEncoder | None
Parameters¶
python_obj: AnyThe object to serialize
The objects type annotation
function jetblack_serialization.json.serialize_untyped ¶
jetblack_serialization.json.serialize_untyped(
) -> str
obj: Any,
config: jetblack_serialization.config.SerializerConfig | None,
encode: JSONEncoder | None
Parameters¶
obj: Anyclass JSONObject(JSONAnnotation) ¶
Summary¶
A JSON property
jetblack_serialization.json.annotations.JSONObject(
) -> None
is_serializable_keys: bool,
type_selector: TypeSelector | None
class JSONProperty(JSONAnnotation) ¶
Summary¶
A JSON property
jetblack_serialization.json.annotations.JSONProperty(
) -> None
tag: str,
*,
is_serializable_keys: bool,
type_selector: TypeSelector | None
Parameters¶
tag: strclass JSONValue(JSONAnnotation) ¶
Summary¶
A JSON property
jetblack_serialization.json.annotations.JSONValue(
) -> None
type_selector: TypeSelector | None