MCPcopy
hub / github.com/golang/protobuf / JSONPBUnmarshaler

Interface JSONPBUnmarshaler

jsonpb/decode.go:63–65  ·  jsonpb/decode.go::JSONPBUnmarshaler

JSONPBUnmarshaler is implemented by protobuf messages that customize the way they are unmarshaled from JSON. Messages that implement this should also implement JSONPBMarshaler so that the custom format can be produced. The JSON unmarshaling must follow the JSON to proto specification: https://dev

Source from the content-addressed store, hash-verified

61//
62// Deprecated: Custom types should implement protobuf reflection instead.
63type JSONPBUnmarshaler interface {
64 UnmarshalJSONPB(*Unmarshaler, []byte) error
65}
66
67// Unmarshal unmarshals a JSON object from r into m.
68func (u *Unmarshaler) Unmarshal(r io.Reader, m proto.Message) error {

Callers 2

UnmarshalNextMethod · 0.65
unmarshalMessageMethod · 0.65

Implementers 2

stringFieldjsonpb/json_test.go
dynamicMessagejsonpb/json_test.go

Calls

no outgoing calls

Tested by

no test coverage detected