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 (structpb.Struct) into a specific Protocol Buffer message type.
Parameters
| Name | Type | Description |
|---|---|---|
| structObj | *structpb.Struct | The source Protocol Buffer Struct object containing the data to be unmarshaled. This object should represent the data in a generic structured format. |
| msg | proto.Message | The target Protocol Buffer message into which the data from structObj will be unmarshaled. This must be a pointer to a proto.Message type. |
Returns
| Type | Description |
|---|---|
error | Returns an error if the input structObj or msg is nil, or if marshaling/unmarshaling fails. |