module documentation
In-house ProtoJSON conversion for direct protobuf messages.
| Exception | |
Raised when a value does not satisfy ProtoJSON rules. |
| Function | message |
Replace a direct message from a ProtoJSON document. |
| Function | message |
Convert a direct message to a ProtoJSON-compatible dictionary. |
| Function | message |
Serialize a direct message to a ProtoJSON document. |
| Function | message |
Convert a direct message to its ProtoJSON value. |
| Function | parse |
Replace a direct message from a ProtoJSON-compatible dictionary. |
| Function | parse |
Replace a direct message from its ProtoJSON value. |
| Type Variable | M |
Undocumented |
| Function | _accepts |
Undocumented |
| Function | _camel |
Undocumented |
| Function | _encode |
Undocumented |
| Function | _encode |
Undocumented |
| Function | _encode |
Undocumented |
| Function | _extension |
Undocumented |
| Function | _field |
Undocumented |
| Function | _fraction |
Undocumented |
| Function | _get |
Undocumented |
| Function | _json |
Undocumented |
| Function | _parse |
Undocumented |
| Function | _parse |
Undocumented |
| Function | _parse |
Undocumented |
| Function | _parse |
Undocumented |
| Function | _parse |
Undocumented |
| Function | _parse |
Undocumented |
| Function | _parse |
Undocumented |
| Function | _reject |
Undocumented |
| Function | _reject |
Undocumented |
| Function | _set |
Undocumented |
| Function | _snake |
Undocumented |
| Constant | _ANY |
Undocumented |
| Constant | _DURATION |
Undocumented |
| Constant | _FLOAT32 |
Undocumented |
| Constant | _SKIP |
Undocumented |
| Constant | _TIMESTAMP |
Undocumented |
| Constant | _TIMESTAMP |
Undocumented |
| Constant | _WRAPPERS |
Undocumented |
def message_from_json(payload:
str | bytes | bytearray, message: M, *, ignore_unknown_fields: bool = False) -> M:
(source)
¶
Replace a direct message from a ProtoJSON document.
def message_to_dict(message:
Message, *, preserving_proto_field_name: bool = False, always_print_fields_with_no_presence: bool = False, use_integers_for_enums: bool = False) -> dict[ str, Any]:
(source)
¶
Convert a direct message to a ProtoJSON-compatible dictionary.
def message_to_json(message:
Message, *, preserving_proto_field_name: bool = False, always_print_fields_with_no_presence: bool = False, use_integers_for_enums: bool = False, indent: int | None = 2, sort_keys: bool = False) -> str:
(source)
¶
Serialize a direct message to a ProtoJSON document.
def message_to_value(message:
Message, *, preserving_proto_field_name: bool = False, always_print_fields_with_no_presence: bool = False, use_integers_for_enums: bool = False) -> Any:
(source)
¶
Convert a direct message to its ProtoJSON value.
def parse_dict(data:
Mapping[ str, Any], message: M, *, ignore_unknown_fields: bool = False) -> M:
(source)
¶
Replace a direct message from a ProtoJSON-compatible dictionary.
def _encode_value(codec:
ValueCodec[ Any], value: Any, *, preserving_proto_field_name: bool, always_print_fields_with_no_presence: bool, use_integers_for_enums: bool) -> Any:
(source)
¶
Undocumented
def _encode_well_known(message:
Message, *, preserving_proto_field_name: bool, always_print_fields_with_no_presence: bool, use_integers_for_enums: bool) -> tuple[ bool, Any]:
(source)
¶
Undocumented
def _parse_extension(message:
Message, extension: Extension[ Any], raw: Any, ignore_unknown_fields: bool):
(source)
¶
Undocumented
def _parse_well_known(value:
Any, message: Message, *, ignore_unknown_fields: bool) -> bool:
(source)
¶
Undocumented
Undocumented
| Value |
|