MCPcopy Index your code
hub / github.com/segmentio/encoding / NewEncoder

Function NewEncoder

json/json.go:501–503  ·  view source on GitHub ↗

NewEncoder is documented at https://golang.org/pkg/encoding/json/#NewEncoder

(w io.Writer)

Source from the content-addressed store, hash-verified

499
500// NewEncoder is documented at https://golang.org/pkg/encoding/json/#NewEncoder
501func NewEncoder(w io.Writer) *Encoder {
502 return &Encoder{writer: w, flags: EscapeHTML | SortMapKeys | appendNewline}
503}
504
505// Encode is documented at https://golang.org/pkg/encoding/json/#Encoder.Encode
506func (enc *Encoder) Encode(v any) error {

Callers 5

BenchmarkCodeEncoderFunction · 0.70
TestCodecFunction · 0.70
TestCodecDurationFunction · 0.70
TestSetTrustRawMessageFunction · 0.70
TestSetAppendNewlineFunction · 0.70

Calls

no outgoing calls

Tested by 5

BenchmarkCodeEncoderFunction · 0.56
TestCodecFunction · 0.56
TestCodecDurationFunction · 0.56
TestSetTrustRawMessageFunction · 0.56
TestSetAppendNewlineFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…