Skip to main content

MarshalPbToStruct

Marshals a proto message into proto Struct using jsonPb marshaler.

def MarshalPbToStruct(
in: proto.Message
) - > *structpb.Struct

Marshals a proto message into a proto Struct using the jsonPb marshaler. This function is used to convert a protobuf message into a more generic, schemaless structure that can be easily consumed by systems that expect JSON-like data.

Parameters

NameTypeDescription
inproto.MessageThe input proto message to be marshaled into a proto Struct. This message must not be nil.

Returns

TypeDescription
*structpb.StructThe marshaled proto Struct, or an error if the marshaling fails.