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.
| 19 | // The NewDecoder method returns a DecoderWrapper, so the underlying |
| 20 | // *json.Decoder methods can be used. |
| 21 | type JSONPb struct { |
| 22 | protojson.MarshalOptions |
| 23 | protojson.UnmarshalOptions |
| 24 | } |
| 25 | |
| 26 | // ContentType always returns "application/json". |
| 27 | func (*JSONPb) ContentType(_ interface{}) string { |
nothing calls this directly
no outgoing calls
no test coverage detected