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

Method NewEncoder

runtime/marshal_json.go:43–45  ·  view source on GitHub ↗

NewEncoder returns an Encoder which writes JSON stream into "w".

(w io.Writer)

Source from the content-addressed store, hash-verified

41
42// NewEncoder returns an Encoder which writes JSON stream into "w".
43func (j *JSONBuiltin) NewEncoder(w io.Writer) Encoder {
44 return json.NewEncoder(w)
45}
46
47// Delimiter for newline encoded JSON streams.
48func (j *JSONBuiltin) Delimiter() []byte {

Callers 2

TestJSONBuiltinEncoderFunction · 0.95

Calls 1

NewEncoderMethod · 0.65

Tested by 2

TestJSONBuiltinEncoderFunction · 0.76