django_socio_grpc.protobuf.json_format
Module Contents
Functions
Checks if a field is optional. |
|
Converts a protobuf message to a dictionary.
Uses the default |
|
API
- django_socio_grpc.protobuf.json_format._is_field_optional(field)
Checks if a field is optional.
Under the hood, Optional fields are OneOf fields with only one field with the name of the OneOf prefixed with an underscore.
- django_socio_grpc.protobuf.json_format.message_to_dict(message, **kwargs)
Converts a protobuf message to a dictionary. Uses the default
google.protobuf.json_format.MessageToDictfunction. Adds None values for optional fields that are not set.
- django_socio_grpc.protobuf.json_format.parse_dict(js_dict, message, **kwargs)