UnmarshalStructToPb
UnmarshalStructToPb unmarshals a proto struct into a proto message using jsonPb marshaler.
def UnmarshalStructToPb(
structObj: *structpb.Struct,
msg: proto.Message
) - > error
Unmarshals a proto struct into a proto message using jsonPb marshaler. This function is used to convert a structured data object into a protobuf message format.
Parameters
| Name | Type | Description |
|---|---|---|
| structObj | *structpb.Struct | The proto struct object to be unmarshaled. This object contains the structured data that needs to be converted. |
| msg | proto.Message | The proto message object into which the data from structObj will be unmarshaled. This is the target protobuf message. |
Returns
| Type | Description |
|---|---|
error | Returns an error if the input structObj or msg is nil, or if marshaling/unmarshaling fails. |