Documentation ¶
Overview ¶
Package jsonenc support encoding and decoding by json.
Index ¶
- Variables
- type Decodable
- type Encoder
- func (enc *Encoder) Add(d encoder.DecodeDetail) error
- func (enc *Encoder) AddHinter(hr hint.Hinter) error
- func (enc *Encoder) Decode(b []byte) (interface{}, error)
- func (enc *Encoder) DecodeSlice(b []byte) ([]interface{}, error)
- func (enc *Encoder) DecodeWithFixedHintType(s string, size int) (interface{}, error)
- func (enc *Encoder) DecodeWithHint(b []byte, ht hint.Hint) (interface{}, error)
- func (enc *Encoder) DecodeWithHintType(b []byte, t hint.Type) (interface{}, error)
- func (*Encoder) Hint() hint.Hint
- func (*Encoder) Marshal(v interface{}) ([]byte, error)
- func (enc *Encoder) SetPool(pool util.ObjectPool) *Encoder
- func (*Encoder) StreamDecoder(r io.Reader) util.StreamDecoder
- func (*Encoder) StreamEncoder(w io.Writer) util.StreamEncoder
- func (*Encoder) Unmarshal(b []byte, v interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var JSONEncoderHint = hint.MustNewHint("json-encoder-v2.0.0")
Functions ¶
This section is empty.
Types ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func NewEncoder ¶
func NewEncoder() *Encoder
func (*Encoder) DecodeSlice ¶
func (*Encoder) DecodeWithFixedHintType ¶
func (*Encoder) DecodeWithHint ¶
func (*Encoder) DecodeWithHintType ¶
func (*Encoder) StreamDecoder ¶
func (*Encoder) StreamDecoder(r io.Reader) util.StreamDecoder
func (*Encoder) StreamEncoder ¶
func (*Encoder) StreamEncoder(w io.Writer) util.StreamEncoder
Click to show internal directories.
Click to hide internal directories.