Documentation ¶
Overview ¶
Package json provides a document Encoder and Decoder implementation that is used to implement Smithy document types for JSON based protocols. The Encoder and Decoder implement the document.Marshaler and document.Unmarshaler interfaces respectively.
This package handles protocol specific implementation details about documents, and can not be used to construct a document type for a service client. To construct a document type see each service clients respective document package and NewLazyDocument function.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder is a Smithy document decoder for JSON based protocols.
func NewDecoder ¶
func NewDecoder(optFns ...func(*DecoderOptions)) *Decoder
NewDecoder returns a Decoder for deserializing Smithy documents for JSON based protocols.
func (*Decoder) DecodeJSONInterface ¶
DecodeJSONInterface decodes the supported JSON input types and stores the result in the value pointed by toValue.
If toValue is not a compatible type, or an error occurs while decoding DecodeJSONInterface will return an error.
The supported input JSON types are:
bool -> JSON boolean float64 -> JSON number json.Number -> JSON number string -> JSON string []interface{} -> JSON array map[string]interface{} -> JSON object nil -> JSON null
type DecoderOptions ¶
type DecoderOptions struct{}
DecoderOptions is the set of options that can be configured for a Decoder.
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder is a Smithy document decoder for JSON based protocols.
func NewEncoder ¶
func NewEncoder(optFns ...func(options *EncoderOptions)) *Encoder
NewEncoder returns an Encoder for serializing Smithy documents for JSON based protocols.
type EncoderOptions ¶
type EncoderOptions struct{}
EncoderOptions is the set of options that can be configured for an Encoder.