MCPcopy
hub / github.com/grpc-ecosystem/grpc-gateway / JSONPb

Struct JSONPb

runtime/marshal_jsonpb.go:21–24  ·  runtime/marshal_jsonpb.go::JSONPb

JSONPb is a Marshaler which marshals/unmarshals into/from JSON with the "google.golang.org/protobuf/encoding/protojson" marshaler. It supports the full functionality of protobuf unlike JSONBuiltin. The NewDecoder method returns a DecoderWrapper, so the underlying *json.Decoder methods can be used.

Source from the content-addressed store, hash-verified

19// The NewDecoder method returns a DecoderWrapper, so the underlying
20// *json.Decoder methods can be used.
21type JSONPb struct {
22 protojson.MarshalOptions
23 protojson.UnmarshalOptions
24}
25
26// ContentType always returns "application/json".
27func (*JSONPb) ContentType(_ interface{}) string {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected