package json
import "github.com/aws/aws-sdk-go-v2/private/protocol/json"
Index ¶
- type Encoder
- func NewEncoder() *Encoder
- func (e *Encoder) Encode() (io.ReadSeeker, error)
- func (e *Encoder) List(t protocol.Target, k string, meta protocol.Metadata) protocol.ListEncoder
- func (e *Encoder) Map(t protocol.Target, k string, meta protocol.Metadata) protocol.MapEncoder
- func (e *Encoder) SetFields(t protocol.Target, k string, m protocol.FieldMarshaler, meta protocol.Metadata)
- func (e *Encoder) SetStream(t protocol.Target, k string, v protocol.StreamMarshaler, meta protocol.Metadata)
- func (e *Encoder) SetValue(t protocol.Target, k string, v protocol.ValueMarshaler, meta protocol.Metadata)
- func (e *Encoder) WriteListEnd()
- func (e *Encoder) WriteListStart()
- func (e *Encoder) WriteMapEnd()
- func (e *Encoder) WriteMapStart()
Types ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
An Encoder provides encoding of the AWS JSON protocol. This encoder will will write all content to JSON. Only supports body and payload targets.
func NewEncoder ¶
func NewEncoder() *Encoder
NewEncoder creates a new encoder for encoding AWS JSON protocol. Only encodes fields into the JSON body, and error is returned if target is anything other than Body or Payload.
func (*Encoder) Encode ¶
func (e *Encoder) Encode() (io.ReadSeeker, error)
Encode returns the encoded XMl reader. An error will be returned if one was encountered while building the JSON body.
func (*Encoder) List ¶
List will return a new listEncoder and create a new scope for the list encoding.
func (*Encoder) Map ¶
Map will return a new mapEncoder and create a new scope for the map encoding.
func (*Encoder) SetFields ¶
func (e *Encoder) SetFields(t protocol.Target, k string, m protocol.FieldMarshaler, meta protocol.Metadata)
SetFields sets the nested fields to the JSON body.
func (*Encoder) SetStream ¶
func (e *Encoder) SetStream(t protocol.Target, k string, v protocol.StreamMarshaler, meta protocol.Metadata)
SetStream is not supported for JSON protocol marshaling.
func (*Encoder) SetValue ¶
func (e *Encoder) SetValue(t protocol.Target, k string, v protocol.ValueMarshaler, meta protocol.Metadata)
SetValue sets an individual value to the JSON body.
func (*Encoder) WriteListEnd ¶
func (e *Encoder) WriteListEnd()
func (*Encoder) WriteListStart ¶
func (e *Encoder) WriteListStart()
func (*Encoder) WriteMapEnd ¶
func (e *Encoder) WriteMapEnd()
func (*Encoder) WriteMapStart ¶
func (e *Encoder) WriteMapStart()
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
private/protocol/json/jsonutil | Package jsonutil provides JSON serialization of AWS requests and responses. |
- Version
- v0.24.0
- Published
- Jul 22, 2020
- Platform
- darwin/amd64
- Imports
- 5 packages
- Last checked
- 7 seconds ago –
Tools for package owners.