Documentation
¶
Overview ¶
Package jsoniter wraps json-iterator/go's Iterator methods with error returns so linting can catch unchecked errors. The underlying iterator's Error property is returned and not reset. See json-iterator/go for method documentation and additional methods that can be added to this library.
Index ¶
- Constants
- Variables
- type Iterator
- func (iter *Iterator) Marshal(v interface{}) ([]byte, error)
- func (iter *Iterator) Parse(cfg j.API, reader io.Reader, bufSize int) (*Iterator, error)
- func (iter *Iterator) ParseBytes(cfg j.API, input []byte) (*Iterator, error)
- func (iter *Iterator) ParseString(cfg j.API, input string) (*Iterator, error)
- func (iter *Iterator) Read() (interface{}, error)
- func (iter *Iterator) ReadAny() (j.Any, error)
- func (iter *Iterator) ReadArray() (bool, error)
- func (iter *Iterator) ReadBool() (bool, error)
- func (iter *Iterator) ReadFloat64() (float64, error)
- func (iter *Iterator) ReadInt8() (int8, error)
- func (iter *Iterator) ReadNil() (bool, error)
- func (iter *Iterator) ReadObject() (string, error)
- func (iter *Iterator) ReadString() (string, error)
- func (iter *Iterator) ReadUint64() (uint64, error)
- func (iter *Iterator) ReadUint64Pointer() (*uint64, error)
- func (iter *Iterator) ReadVal(obj interface{}) error
- func (iter *Iterator) ReportError(op, msg string) error
- func (iter *Iterator) Skip() error
- func (iter *Iterator) Unmarshal(data []byte, v interface{}) error
- func (iter *Iterator) WhatIsNext() (j.ValueType, error)
Constants ¶
View Source
const ( InvalidValue = j.InvalidValue StringValue = j.StringValue NumberValue = j.NumberValue NilValue = j.NilValue BoolValue = j.BoolValue ArrayValue = j.ArrayValue ObjectValue = j.ObjectValue )
Variables ¶
View Source
var (
ConfigDefault = j.ConfigDefault
)
Functions ¶
This section is empty.
Types ¶
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
func NewIterator ¶
func (*Iterator) ParseBytes ¶
func (*Iterator) ParseString ¶
func (*Iterator) ReadFloat64 ¶
func (*Iterator) ReadObject ¶
func (*Iterator) ReadString ¶
func (*Iterator) ReadUint64 ¶
func (*Iterator) ReadUint64Pointer ¶
func (*Iterator) ReportError ¶
Click to show internal directories.
Click to hide internal directories.