// NewJSONDecoder a new Decoder of Protobuf messages for a non-streaming response.
NewJSONDecoder a new Decoder of Protobuf messages for a non-streaming response.
// NewJSONDecoder a new Decoder of Protobuf messages for a non - streaming response .
func NewJSONDecoder(r io.Reader) Decoder {
	return func(u Unmarshaler) error {
		raw, err := ioutil.ReadAll(r)
		if err != nil {
			return err
		}
		return json.Unmarshal(raw, u)
	}
}
func NewJSONDecoder ( r io . Reader ) Decoder { return func ( u Unmarshaler ) error { raw , err := ioutil . ReadAll ( r ) if err != nil { return err } return json . Unmarshal ( raw , u ) } }
NewJSONDecoder a new Decoder of Protobuf messages for a non-streaming response.
NewJSONDecoder a new Decoder of Protobuf messages for a non - streaming response .