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 proto Struct using jsonPb marshaler. This function is used to convert a protobuf message into a structured protobuf object, which can be useful for dynamic data handling or integration with systems that expect a generic structured format.

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.