package json
import "github.com/aws/aws-sdk-go-v2/aws/protocol/json"
Index ¶
- type Array
- type Encoder
- type Object
- type Value
- func (jv Value) Array() *Array
- func (jv Value) Boolean(v bool)
- func (jv Value) ByteSlice(v []byte)
- func (jv Value) Float(v float64)
- func (jv Value) Integer(v int64)
- func (jv Value) Null()
- func (jv Value) Object() *Object
- func (jv Value) String(v string)
- func (jv Value) Time(v time.Time, format string) error
Types ¶
type Array ¶
type Array struct {
// contains filtered or unexported fields
}
Array represent the encoding of a JSON Array
func (*Array) Close ¶
func (a *Array) Close()
Close encodes the end of the JSON Array
func (*Array) Value ¶
Value adds a new element to the JSON Array. Returns a Value type that is used to encode the array element.
type Encoder ¶
type Encoder struct { Value // contains filtered or unexported fields }
Encoder is JSON encoder that supports construction of JSON values using methods.
func NewEncoder ¶
func NewEncoder() *Encoder
NewEncoder returns a new JSON encoder
func (Encoder) Bytes ¶
Bytes returns the []byte slice of the JSON encoder
func (Encoder) String ¶
String returns the String output of the JSON encoder
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
Object represents the encoding of a JSON Object type
func (*Object) Close ¶
func (o *Object) Close()
Close encodes the end of the JSON Object
func (*Object) Key ¶
Key adds the given named key to the JSON object. Returns a Value encoder that should be used to encode a JSON value type.
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
Value represents a JSON Value type JSON Value types: Object, Array, String, Number, Boolean, and Null
func (Value) Array ¶
Array returns a new Array encoder
func (Value) Boolean ¶
Boolean encodes v as a JSON boolean
func (Value) ByteSlice ¶
ByteSlice encodes v as a base64 value in JSON string
func (Value) Float ¶
Float encodes v as a JSON number
func (Value) Integer ¶
Integer encodes v as a JSON number
func (Value) Null ¶
func (jv Value) Null()
Null encodes a null JSON value
func (Value) Object ¶
Object returns a new Object encoder
func (Value) String ¶
String encodes v as a JSON string
func (Value) Time ¶
Time encodes v using the provided format specifier as a JSON string
Source Files ¶
array.go constants.go encoder.go escape.go object.go value.go
- Version
- v0.22.0
- Published
- Apr 27, 2020
- Platform
- darwin/amd64
- Imports
- 8 packages
- Last checked
- 2 minutes ago –
Tools for package owners.