MarshalPbToString
Marshals a proto message using a JSON Protobuf marshaler to a string.
def MarshalPbToString(
msg: proto.Message
) - > string, error
Marshals a proto message using the jsonPb marshaler into a string. Callers use this to convert a protobuf message object into its JSON string representation.
Parameters
| Name | Type | Description |
|---|---|---|
| msg | proto.Message | The protobuf message object to be marshaled into a string. |
Returns
| Type | Description |
|---|---|
string, error | The JSON string representation of the protobuf message, or an error if marshaling fails. |