Documentation ¶
Index ¶
- func CollectUnknownField(decoder *json.Decoder) ([]byte, error)
- func DiscardUnknownField(decoder *json.Decoder) error
- type Array
- type Encoder
- type Object
- type Value
- func (jv Value) Array() *Array
- func (jv Value) Base64EncodeBytes(v []byte)
- func (jv Value) BigDecimal(v *big.Float)
- func (jv Value) BigInteger(v *big.Int)
- func (jv Value) Boolean(v bool)
- func (jv Value) Byte(v int8)
- func (jv Value) Double(v float64)
- func (jv Value) Float(v float32)
- func (jv Value) Integer(v int32)
- func (jv Value) Long(v int64)
- func (jv Value) Null()
- func (jv Value) Object() *Object
- func (jv Value) Short(v int16)
- func (jv Value) String(v string)
- func (jv Value) Write(v []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectUnknownField ¶
CollectUnknownField grabs the contents of unknown fields from the decoder body and returns them as a byte slice. This is useful for skipping unknown fields without completely discarding them.
func DiscardUnknownField ¶
DiscardUnknownField discards unknown fields from decoder body. This function is useful while deserializing json body with additional unknown information that should be discarded.
Types ¶
type Array ¶
type Array struct {
// contains filtered or unexported fields
}
Array represent the encoding of a JSON Array
type Encoder ¶
type Encoder struct { Value // contains filtered or unexported fields }
Encoder is JSON encoder that supports construction of JSON values using methods.
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
Object represents the encoding of a JSON Object 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) Base64EncodeBytes ¶
Base64EncodeBytes writes v as a base64 value in JSON string
func (Value) BigDecimal ¶
BigDecimal encodes v as JSON value