MCPcopy Create free account
hub / github.com/aws/smithy-go / NewEncoder

Function NewEncoder

encoding/json/encoder.go:15–20  ·  view source on GitHub ↗

NewEncoder returns a new JSON encoder

()

Source from the content-addressed store, hash-verified

13
14// NewEncoder returns a new JSON encoder
15func NewEncoder() *Encoder {
16 writer := bytes.NewBuffer(nil)
17 scratch := make([]byte, 64)
18
19 return &Encoder{w: writer, Value: newValue(writer, &scratch)}
20}
21
22// String returns the String output of the JSON encoder
23func (e Encoder) String() string {

Callers 2

TestEncoderFunction · 0.92
TestObjectKey_escapedFunction · 0.70

Calls 1

newValueFunction · 0.70

Tested by 2

TestEncoderFunction · 0.74
TestObjectKey_escapedFunction · 0.56