Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var JSONPBMarshaller = &jsonpb.Marshaler{ EmitDefaults: true, }
JSONPBMarshaller marshals protobufs as JSON.
View Source
var JSONPBUnmarshaller = jsonpb.Unmarshaler{ AllowUnknownFields: true, }
JSONPBUnmarshaller unmarshals JSON and creates corresponding protobufs.
Functions ¶
func ParseJSONProto ¶
ParseJSONProto takes an input string and a proto message indicating the type of message and parses either a single object or an array of objects. It always returns an array, which will be a singleton array if exactly one item was passed.
The parameter msg is treated as a template only. We *always* clone it defensively before reading into it.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.