Documentation ¶
Index ¶
- func DecodeTime(str string) (t time.Time, err error)
- func Marshal(src interface{}) (b []byte, err error)
- func Unmarshal(data []byte, dst interface{}) error
- func UnmarshalValue(data []byte, v reflect.Value) error
- type DefaultDecoder
- func (dec *DefaultDecoder) DecodeArray(r *Reader, v reflect.Value) error
- func (dec DefaultDecoder) DecodeBool(r *Reader, v reflect.Value) error
- func (dec DefaultDecoder) DecodeByte(r *Reader, v reflect.Value) error
- func (dec DefaultDecoder) DecodeCurrency(r *Reader, v reflect.Value) error
- func (dec DefaultDecoder) DecodeFloat(r *Reader, v reflect.Value) error
- func (dec DefaultDecoder) DecodeInt(quote bool) ValueDecoder
- func (dec DefaultDecoder) DecodeInterface(r *Reader, v reflect.Value) error
- func (dec DefaultDecoder) DecodeJSONNumber(r *Reader, v reflect.Value) error
- func (dec DefaultDecoder) DecodeJSONRaw(r *Reader, v reflect.Value) error
- func (dec DefaultDecoder) DecodeLanguage(r *Reader, v reflect.Value) error
- func (dec *DefaultDecoder) DecodeMap(r *Reader, v reflect.Value) error
- func (dec *DefaultDecoder) DecodePtr(r *Reader, v reflect.Value) error
- func (dec *DefaultDecoder) DecodeSlice(r *Reader, v reflect.Value) error
- func (dec DefaultDecoder) DecodeString(r *Reader, v reflect.Value) error
- func (dec *DefaultDecoder) DecodeStruct(r *Reader, v reflect.Value) error
- func (dec DefaultDecoder) DecodeTime(r *Reader, v reflect.Value) error
- func (dec DefaultDecoder) DecodeUint(quote bool) ValueDecoder
- type DefaultEncoder
- func (enc *DefaultEncoder) EncodeArray(w *Writer, v reflect.Value) error
- func (enc DefaultEncoder) EncodeBool(w *Writer, v reflect.Value) error
- func (enc DefaultEncoder) EncodeByte(w *Writer, v reflect.Value) error
- func (enc DefaultEncoder) EncodeFloat(w *Writer, v reflect.Value) error
- func (enc DefaultEncoder) EncodeInt(w *Writer, v reflect.Value) error
- func (enc *DefaultEncoder) EncodeInterface(w *Writer, v reflect.Value) error
- func (enc DefaultEncoder) EncodeJSONRaw(w *Writer, v reflect.Value) error
- func (enc *DefaultEncoder) EncodeMap(w *Writer, v reflect.Value) error
- func (enc *DefaultEncoder) EncodePtr(w *Writer, v reflect.Value) error
- func (enc DefaultEncoder) EncodeString(w *Writer, v reflect.Value) error
- func (enc DefaultEncoder) EncodeStringer(w *Writer, v reflect.Value) error
- func (enc *DefaultEncoder) EncodeStruct(w *Writer, v reflect.Value) error
- func (enc DefaultEncoder) EncodeTime(w *Writer, v reflect.Value) error
- func (enc DefaultEncoder) EncodeUint(w *Writer, v reflect.Value) error
- type ErrInvalidJSON
- type ErrNoDecoder
- type ErrNoEncoder
- type Marshaler
- type Number
- type Reader
- func (r *Reader) Bytes() []byte
- func (r *Reader) IsNull() bool
- func (r *Reader) ReadArray(cb func(r *Reader) error) error
- func (r *Reader) ReadBoolean() (bool, error)
- func (r *Reader) ReadBytes() ([]byte, error)
- func (r *Reader) ReadFlattenObject(cb func(*Reader, string) error) error
- func (r *Reader) ReadNull() error
- func (r *Reader) ReadNumber() (Number, error)
- func (r *Reader) ReadObject(cb func(*Reader, string) error) error
- func (r *Reader) ReadRawString() (string, error)
- func (r *Reader) ReadString() (string, error)
- func (r *Reader) ReadValue() (interface{}, error)
- type Registry
- func (r *Registry) LookupDecoder(t reflect.Type) (ValueDecoder, error)
- func (r *Registry) LookupEncoder(v reflect.Value) (ValueEncoder, error)
- func (r *Registry) SetKindCoder(k reflect.Kind, enc ValueEncoder, dec ValueDecoder)
- func (r *Registry) SetTypeCoder(t reflect.Type, enc ValueEncoder, dec ValueDecoder)
- type Unmarshaler
- type ValueDecoder
- type ValueEncoder
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DefaultDecoder ¶
type DefaultDecoder struct {
// contains filtered or unexported fields
}
DefaultDecoder :
func (*DefaultDecoder) DecodeArray ¶
func (dec *DefaultDecoder) DecodeArray(r *Reader, v reflect.Value) error
DecodeArray :
func (DefaultDecoder) DecodeBool ¶
func (dec DefaultDecoder) DecodeBool(r *Reader, v reflect.Value) error
DecodeBool :
func (DefaultDecoder) DecodeByte ¶
func (dec DefaultDecoder) DecodeByte(r *Reader, v reflect.Value) error
DecodeByte :
func (DefaultDecoder) DecodeCurrency ¶
func (dec DefaultDecoder) DecodeCurrency(r *Reader, v reflect.Value) error
DecodeCurrency :
func (DefaultDecoder) DecodeFloat ¶
func (dec DefaultDecoder) DecodeFloat(r *Reader, v reflect.Value) error
DecodeFloat :
func (DefaultDecoder) DecodeInt ¶
func (dec DefaultDecoder) DecodeInt(quote bool) ValueDecoder
DecodeInt :
func (DefaultDecoder) DecodeInterface ¶
func (dec DefaultDecoder) DecodeInterface(r *Reader, v reflect.Value) error
DecodeInterface :
func (DefaultDecoder) DecodeJSONNumber ¶
func (dec DefaultDecoder) DecodeJSONNumber(r *Reader, v reflect.Value) error
DecodeJSONNumber :
func (DefaultDecoder) DecodeJSONRaw ¶
func (dec DefaultDecoder) DecodeJSONRaw(r *Reader, v reflect.Value) error
DecodeJSONRaw :
func (DefaultDecoder) DecodeLanguage ¶
func (dec DefaultDecoder) DecodeLanguage(r *Reader, v reflect.Value) error
DecodeLanguage :
func (*DefaultDecoder) DecodeMap ¶
func (dec *DefaultDecoder) DecodeMap(r *Reader, v reflect.Value) error
DecodeMap :
func (*DefaultDecoder) DecodePtr ¶
func (dec *DefaultDecoder) DecodePtr(r *Reader, v reflect.Value) error
DecodePtr :
func (*DefaultDecoder) DecodeSlice ¶
func (dec *DefaultDecoder) DecodeSlice(r *Reader, v reflect.Value) error
DecodeSlice :
func (DefaultDecoder) DecodeString ¶
func (dec DefaultDecoder) DecodeString(r *Reader, v reflect.Value) error
DecodeString :
func (*DefaultDecoder) DecodeStruct ¶
func (dec *DefaultDecoder) DecodeStruct(r *Reader, v reflect.Value) error
DecodeStruct :
func (DefaultDecoder) DecodeTime ¶
func (dec DefaultDecoder) DecodeTime(r *Reader, v reflect.Value) error
DecodeTime :
func (DefaultDecoder) DecodeUint ¶
func (dec DefaultDecoder) DecodeUint(quote bool) ValueDecoder
DecodeUint :
type DefaultEncoder ¶
type DefaultEncoder struct {
// contains filtered or unexported fields
}
DefaultEncoder :
func (*DefaultEncoder) EncodeArray ¶
func (enc *DefaultEncoder) EncodeArray(w *Writer, v reflect.Value) error
EncodeArray :
func (DefaultEncoder) EncodeBool ¶
func (enc DefaultEncoder) EncodeBool(w *Writer, v reflect.Value) error
EncodeBool :
func (DefaultEncoder) EncodeByte ¶
func (enc DefaultEncoder) EncodeByte(w *Writer, v reflect.Value) error
EncodeByte :
func (DefaultEncoder) EncodeFloat ¶
func (enc DefaultEncoder) EncodeFloat(w *Writer, v reflect.Value) error
EncodeFloat :
func (DefaultEncoder) EncodeInt ¶
func (enc DefaultEncoder) EncodeInt(w *Writer, v reflect.Value) error
EncodeInt :
func (*DefaultEncoder) EncodeInterface ¶
func (enc *DefaultEncoder) EncodeInterface(w *Writer, v reflect.Value) error
EncodeInterface :
func (DefaultEncoder) EncodeJSONRaw ¶
func (enc DefaultEncoder) EncodeJSONRaw(w *Writer, v reflect.Value) error
EncodeJSONRaw :
func (*DefaultEncoder) EncodeMap ¶
func (enc *DefaultEncoder) EncodeMap(w *Writer, v reflect.Value) error
EncodeMap :
func (*DefaultEncoder) EncodePtr ¶
func (enc *DefaultEncoder) EncodePtr(w *Writer, v reflect.Value) error
EncodePtr :
func (DefaultEncoder) EncodeString ¶
func (enc DefaultEncoder) EncodeString(w *Writer, v reflect.Value) error
EncodeString :
func (DefaultEncoder) EncodeStringer ¶
func (enc DefaultEncoder) EncodeStringer(w *Writer, v reflect.Value) error
EncodeStringer :
func (*DefaultEncoder) EncodeStruct ¶
func (enc *DefaultEncoder) EncodeStruct(w *Writer, v reflect.Value) error
EncodeStruct :
func (DefaultEncoder) EncodeTime ¶
func (enc DefaultEncoder) EncodeTime(w *Writer, v reflect.Value) error
EncodeTime :
func (DefaultEncoder) EncodeUint ¶
func (enc DefaultEncoder) EncodeUint(w *Writer, v reflect.Value) error
EncodeUint :
type ErrInvalidJSON ¶
type ErrInvalidJSON struct {
// contains filtered or unexported fields
}
ErrInvalidJSON :
func (ErrInvalidJSON) Error ¶
func (e ErrInvalidJSON) Error() string
type ErrNoDecoder ¶
ErrNoDecoder :
func (ErrNoDecoder) Error ¶
func (err ErrNoDecoder) Error() (msg string)
type ErrNoEncoder ¶
ErrNoEncoder :
func (ErrNoEncoder) Error ¶
func (err ErrNoEncoder) Error() (msg string)
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader :
func (*Reader) ReadFlattenObject ¶
ReadFlattenObject :
func (*Reader) ReadObject ¶
ReadObject :
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry :
func (*Registry) LookupDecoder ¶
func (r *Registry) LookupDecoder(t reflect.Type) (ValueDecoder, error)
LookupDecoder :
func (*Registry) LookupEncoder ¶
func (r *Registry) LookupEncoder(v reflect.Value) (ValueEncoder, error)
LookupEncoder :
func (*Registry) SetKindCoder ¶
func (r *Registry) SetKindCoder(k reflect.Kind, enc ValueEncoder, dec ValueDecoder)
SetKindCoder :
func (*Registry) SetTypeCoder ¶
func (r *Registry) SetTypeCoder(t reflect.Type, enc ValueEncoder, dec ValueDecoder)
SetTypeCoder :
Click to show internal directories.
Click to hide internal directories.