Documentation ¶
Index ¶
- func UnmarshalJSON(d []byte) (val json.Marshaler, err error)
- type Array
- func (a *Array) Append(v ...json.Marshaler) error
- func (a *Array) At(i int) json.Marshaler
- func (a *Array) Cap() int
- func (a *Array) Clear()
- func (a *Array) Insert(i int, v json.Marshaler) error
- func (a *Array) Len() int
- func (a *Array) MarshalJSON() ([]byte, error)
- func (a *Array) Remove(i int) error
- func (a *Array) Reserve(c int)
- func (a *Array) Set(i int, v json.Marshaler) error
- func (a *Array) Trim()
- func (a *Array) UnmarshalJSON(d []byte) (err error)
- type Bool
- type BoundsError
- type Float
- type Int
- type MultipleValuesError
- type Null
- type Object
- func (o *Object) Clear()
- func (o *Object) Delete(k String)
- func (o *Object) Get(k String) json.Marshaler
- func (o *Object) Len() int
- func (o *Object) MarshalJSON() ([]byte, error)
- func (o *Object) Put(k String, v json.Marshaler) error
- func (o *Object) Range(f func(k String, v json.Marshaler) bool)
- func (o *Object) UnmarshalJSON(d []byte) (err error)
- type String
- type SyntaxError
- type UnmarshalContainer
- type UnmarshalTypeError
- type UnsupportedTypeError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Array ¶
type Array struct {
// contains filtered or unexported fields
}
Array represents a JSON-array.
func (*Array) MarshalJSON ¶
MarshalJSON returns a JSON-array.
func (*Array) UnmarshalJSON ¶
UnmarshalJSON unmarshals a JSON-array into a.
errors:
*MultipleValuesError *SyntaxError *UnmarshalTypeError
type BoundsError ¶
type BoundsError struct {
Index int
}
BoundsError indicates an array-access out-of-bounds.
func (*BoundsError) Error ¶
func (err *BoundsError) Error() string
type MultipleValuesError ¶
type MultipleValuesError struct {
Data []byte
}
MultipleValuesError indicates multiple top-level JSON-values in the input-data.
func (*MultipleValuesError) Error ¶
func (err *MultipleValuesError) Error() string
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
Object represents a JSON-object.
func (*Object) MarshalJSON ¶
MarshalJSON returns a JSON-object.
func (*Object) UnmarshalJSON ¶
UnmarshalJSON unmarshals a JSON-object into o.
errors:
*MultipleValuesError *SyntaxError *UnmarshalTypeError
type SyntaxError ¶
type SyntaxError struct {
Err *json.SyntaxError
}
SyntaxError indicates a syntax-error in the input-data.
func (*SyntaxError) Error ¶
func (err *SyntaxError) Error() string
func (*SyntaxError) Unwrap ¶
func (err *SyntaxError) Unwrap() error
type UnmarshalContainer ¶
UnmarshalContainer wraps UnmarshalJSON, for use with json.Decoder.
func (*UnmarshalContainer) UnmarshalJSON ¶
func (c *UnmarshalContainer) UnmarshalJSON(d []byte) error
type UnmarshalTypeError ¶
type UnmarshalTypeError struct { Value string // json-value-type: null,bool,int,float,string,object,array Type string // go-type: Object,Array }
UnmarshalTypeError indicates a JSON-value, inappropriate for a specific go-type.
func (*UnmarshalTypeError) Error ¶
func (err *UnmarshalTypeError) Error() string
type UnsupportedTypeError ¶
UnsupportedTypeError indicates an illegal type.
func (*UnsupportedTypeError) Error ¶
func (err *UnsupportedTypeError) Error() string
Click to show internal directories.
Click to hide internal directories.