Documentation
¶
Index ¶
- func Decode(data interface{}, ptr interface{})
- func Encode(data interface{}) []byte
- type Value
- func (v *Value) Bool() bool
- func (v *Value) Bytes() []byte
- func (v *Value) Data() interface{}
- func (v *Value) Decode(ptr interface{})
- func (v *Value) Encode() []byte
- func (v *Value) Float() float64
- func (v *Value) Int() int
- func (v *Value) MarshalJSON() ([]byte, error)
- func (v *Value) String() string
- func (v *Value) TryDecode(ptr interface{}) (err error)
- func (v *Value) TryEncode() (output []byte, err error)
- func (v *Value) UnmarshalJSON(b []byte) error
- func (v *Value) Valid() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
Value adapter for value of any type, provide uniform encoding and decoding.
func (*Value) Decode ¶
func (v *Value) Decode(ptr interface{})
Decode decode data bytes to ptr, panic if failed
func (*Value) MarshalJSON ¶
func (*Value) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.