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

Function NewEncoder

document/json/json.go:4–14  ·  view source on GitHub ↗

NewEncoder returns an Encoder for serializing Smithy documents for JSON based protocols.

(optFns ...func(options *EncoderOptions))

Source from the content-addressed store, hash-verified

2
3// NewEncoder returns an Encoder for serializing Smithy documents for JSON based protocols.
4func NewEncoder(optFns ...func(options *EncoderOptions)) *Encoder {
5 o := EncoderOptions{}
6
7 for _, fn := range optFns {
8 fn(&o)
9 }
10
11 return &Encoder{
12 options: o,
13 }
14}
15
16// NewDecoder returns a Decoder for deserializing Smithy documents for JSON based protocols.
17func NewDecoder(optFns ...func(*DecoderOptions)) *Decoder {

Callers 3

testEncodeFunction · 0.92

Calls

no outgoing calls

Tested by 3

testEncodeFunction · 0.74