Documentation ¶
Index ¶
- Variables
- func Config(config jsoniter.Config)
- func ConfigCompatibleWithStandardLibrary()
- func Default() jsoniter.API
- func IsEmptyArray(p []byte) (ok bool)
- func IsEmptyObject(p []byte) (ok bool)
- func IsNull(p []byte) (ok bool)
- func Marshal(v interface{}) (p []byte, err error)
- func Shorted() jsoniter.API
- func Unmarshal(data []byte, v interface{}) (err error)
- func UnsafeMarshal(v interface{}) []byte
- func UnsafeUnmarshal(data []byte, v interface{})
- func Validate(data []byte) bool
- func ValidateString(data string) bool
- type Array
- func (array *Array) Add(values ...interface{}) (err error)
- func (array *Array) Empty() (ok bool)
- func (array *Array) Get(i int, v interface{}) (err error)
- func (array *Array) Len() (size int)
- func (array *Array) MapTo(v interface{}) (err error)
- func (array *Array) MarshalJSON() (p []byte, err error)
- func (array *Array) Raw() (raw []byte)
- func (array *Array) Remove(i int) (err error)
- func (array *Array) UnmarshalJSON(p []byte) (err error)
- func (array *Array) WriteTo(out *Array) (err error)
- type Date
- type Marshaler
- type Object
- func (object *Object) Contains(path string) (has bool)
- func (object *Object) Empty() (ok bool)
- func (object *Object) Get(path string, v interface{}) (err error)
- func (object *Object) MapTo(v interface{}) (err error)
- func (object *Object) MarshalJSON() (p []byte, err error)
- func (object *Object) Merge(src *Object) (err error)
- func (object *Object) Put(path string, v interface{}) (err error)
- func (object *Object) PutRaw(path string, raw []byte) (err error)
- func (object *Object) Raw() (raw []byte)
- func (object *Object) Remove(path string) (err error)
- func (object *Object) UnmarshalJSON(p []byte) (err error)
- func (object *Object) WriteTo(out *Object) (err error)
- type RawMessage
- func (m RawMessage) MapToArray() (r *Array, err error)
- func (m RawMessage) MapToObject() (r *Object, err error)
- func (m RawMessage) Marshal() (p []byte, err error)
- func (m RawMessage) MarshalBinary() (data []byte, err error)
- func (m RawMessage) MarshalJSON() ([]byte, error)
- func (m *RawMessage) Scan(src interface{}) (err error)
- func (m RawMessage) TryMapToArray() bool
- func (m RawMessage) TryMapToObject() bool
- func (m RawMessage) Unmarshal(dst interface{}) (err error)
- func (m *RawMessage) UnmarshalBinary(data []byte) (err error)
- func (m *RawMessage) UnmarshalJSON(data []byte) error
- func (m RawMessage) Valid() (ok bool)
- func (m RawMessage) Value() (v any)
- type Time
- type Unmarshaler
Constants ¶
This section is empty.
Variables ¶
View Source
var (
EmptyArrayBytes = []byte{'[', ']'}
)
View Source
var (
EmptyObjectBytes = []byte{'{', '}'}
)
View Source
var (
NullBytes = []byte("null")
)
Functions ¶
func ConfigCompatibleWithStandardLibrary ¶ added in v1.16.1
func ConfigCompatibleWithStandardLibrary()
func IsEmptyArray ¶ added in v1.15.0
func IsEmptyObject ¶ added in v1.15.0
func UnsafeMarshal ¶
func UnsafeMarshal(v interface{}) []byte
func UnsafeUnmarshal ¶
func UnsafeUnmarshal(data []byte, v interface{})
func ValidateString ¶
Types ¶
type Array ¶
type Array struct {
// contains filtered or unexported fields
}
func NewArrayFromBytes ¶
func (*Array) MarshalJSON ¶
func (*Array) UnmarshalJSON ¶
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
func NewObjectFromBytes ¶
func NewObjectFromInterface ¶
func NewObjectFromInterface(v interface{}) *Object
func (*Object) MarshalJSON ¶
func (*Object) UnmarshalJSON ¶
type RawMessage ¶ added in v1.1.0
type RawMessage []byte
func (RawMessage) MapToArray ¶ added in v1.1.0
func (m RawMessage) MapToArray() (r *Array, err error)
func (RawMessage) MapToObject ¶ added in v1.1.0
func (m RawMessage) MapToObject() (r *Object, err error)
func (RawMessage) Marshal ¶ added in v1.16.6
func (m RawMessage) Marshal() (p []byte, err error)
Marshal objects.Marshal
func (RawMessage) MarshalBinary ¶ added in v1.4.3
func (m RawMessage) MarshalBinary() (data []byte, err error)
func (RawMessage) MarshalJSON ¶ added in v1.1.0
func (m RawMessage) MarshalJSON() ([]byte, error)
func (*RawMessage) Scan ¶ added in v1.16.0
func (m *RawMessage) Scan(src interface{}) (err error)
Scan sql.Scanner
func (RawMessage) TryMapToArray ¶ added in v1.1.0
func (m RawMessage) TryMapToArray() bool
func (RawMessage) TryMapToObject ¶ added in v1.1.0
func (m RawMessage) TryMapToObject() bool
func (RawMessage) Unmarshal ¶ added in v1.16.6
func (m RawMessage) Unmarshal(dst interface{}) (err error)
Unmarshal objects.Unmarshal
func (*RawMessage) UnmarshalBinary ¶ added in v1.4.3
func (m *RawMessage) UnmarshalBinary(data []byte) (err error)
func (*RawMessage) UnmarshalJSON ¶ added in v1.1.0
func (m *RawMessage) UnmarshalJSON(data []byte) error
func (RawMessage) Valid ¶ added in v1.16.2
func (m RawMessage) Valid() (ok bool)
Valid objects.Valid
type Unmarshaler ¶
Click to show internal directories.
Click to hide internal directories.