Versions in this module Expand all Collapse all v2 v2.5.2 Mar 27, 2020 v2.5.1 Mar 11, 2020 Changes in this version + var ErrExpectsPointer = fmt.Errorf("gojsonq: failed to unmarshal, expects pointer") + var ErrImmutable = fmt.Errorf("gojsonq: failed to unmarshal, target is not mutable") + var ErrTypeMismatch = fmt.Errorf("gojsonq: failed to unmarshal, target type misatched") + type Decoder interface + Decode func(data []byte, v interface{}) error + type DefaultDecoder struct + func (u *DefaultDecoder) Decode(data []byte, v interface{}) error + type JSONQ struct + func New(options ...OptionFunc) *JSONQ + func (j *JSONQ) Avg(property ...string) float64 + func (j *JSONQ) Copy() *JSONQ + func (j *JSONQ) Count() int + func (j *JSONQ) Distinct(property string) *JSONQ + func (j *JSONQ) Error() error + func (j *JSONQ) Errors() []error + func (j *JSONQ) File(filename string) *JSONQ + func (j *JSONQ) Find(path string) interface{} + func (j *JSONQ) FindR(path string) (*Result, error) + func (j *JSONQ) First() interface{} + func (j *JSONQ) FirstR() (*Result, error) + func (j *JSONQ) From(node string) *JSONQ + func (j *JSONQ) FromInterface(v interface{}) *JSONQ + func (j *JSONQ) FromString(str string) *JSONQ + func (j *JSONQ) Get() interface{} + func (j *JSONQ) GetR() (*Result, error) + func (j *JSONQ) GroupBy(property string) *JSONQ + func (j *JSONQ) JSONString(json string) *JSONQ + func (j *JSONQ) Last() interface{} + func (j *JSONQ) LastR() (*Result, error) + func (j *JSONQ) Limit(limit int) *JSONQ + func (j *JSONQ) Macro(operator string, fn QueryFunc) *JSONQ + func (j *JSONQ) Max(property ...string) float64 + func (j *JSONQ) Min(property ...string) float64 + func (j *JSONQ) More() *JSONQ + func (j *JSONQ) Nth(index int) interface{} + func (j *JSONQ) NthR(index int) (*Result, error) + func (j *JSONQ) Offset(offset int) *JSONQ + func (j *JSONQ) Only(properties ...string) interface{} + func (j *JSONQ) OnlyR(properties ...string) (*Result, error) + func (j *JSONQ) OrWhere(key, cond string, val interface{}) *JSONQ + func (j *JSONQ) Out(v interface{}) + func (j *JSONQ) Pluck(property string) interface{} + func (j *JSONQ) PluckR(property string) (*Result, error) + func (j *JSONQ) Reader(r io.Reader) *JSONQ + func (j *JSONQ) Reset() *JSONQ + func (j *JSONQ) Select(properties ...string) *JSONQ + func (j *JSONQ) Sort(order ...string) *JSONQ + func (j *JSONQ) SortBy(order ...string) *JSONQ + func (j *JSONQ) String() string + func (j *JSONQ) Sum(property ...string) float64 + func (j *JSONQ) Where(key, cond string, val interface{}) *JSONQ + func (j *JSONQ) WhereContains(key string, val interface{}) *JSONQ + func (j *JSONQ) WhereEndsWith(key string, val interface{}) *JSONQ + func (j *JSONQ) WhereEqual(key string, val interface{}) *JSONQ + func (j *JSONQ) WhereIn(key string, val interface{}) *JSONQ + func (j *JSONQ) WhereLenEqual(key string, val interface{}) *JSONQ + func (j *JSONQ) WhereLenNotEqual(key string, val interface{}) *JSONQ + func (j *JSONQ) WhereNil(key string) *JSONQ + func (j *JSONQ) WhereNotEqual(key string, val interface{}) *JSONQ + func (j *JSONQ) WhereNotIn(key string, val interface{}) *JSONQ + func (j *JSONQ) WhereNotNil(key string) *JSONQ + func (j *JSONQ) WhereStartsWith(key string, val interface{}) *JSONQ + func (j *JSONQ) WhereStrictContains(key string, val interface{}) *JSONQ + func (j *JSONQ) Writer(w io.Writer) + type OptionFunc func(*JSONQ) error + func SetDecoder(u Decoder) OptionFunc + func SetSeparator(s string) OptionFunc + func WithDecoder(u Decoder) OptionFunc + func WithSeparator(s string) OptionFunc + type QueryFunc func(x, y interface{}) (bool, error) + type Result struct + func NewResult(v interface{}) *Result + func (r *Result) As(v interface{}) error + func (r *Result) Bool() (bool, error) + func (r *Result) BoolSlice() ([]bool, error) + func (r *Result) Duration() (time.Duration, error) + func (r *Result) DurationSlice() ([]time.Duration, error) + func (r *Result) Float32() (float32, error) + func (r *Result) Float32Slice() ([]float32, error) + func (r *Result) Float64() (float64, error) + func (r *Result) Float64Slice() ([]float64, error) + func (r *Result) Int() (int, error) + func (r *Result) Int16() (int16, error) + func (r *Result) Int16Slice() ([]int16, error) + func (r *Result) Int32() (int32, error) + func (r *Result) Int32Slice() ([]int32, error) + func (r *Result) Int64() (int64, error) + func (r *Result) Int64Slice() ([]int64, error) + func (r *Result) Int8() (int8, error) + func (r *Result) Int8Slice() ([]int8, error) + func (r *Result) IntSlice() ([]int, error) + func (r *Result) Nil() bool + func (r *Result) String() (string, error) + func (r *Result) StringSlice() ([]string, error) + func (r *Result) Time(layout string) (time.Time, error) + func (r *Result) TimeSlice(layout string) ([]time.Time, error) + func (r *Result) Uint() (uint, error) + func (r *Result) Uint16() (uint16, error) + func (r *Result) Uint16Slice() ([]uint16, error) + func (r *Result) Uint32() (uint32, error) + func (r *Result) Uint32Slice() ([]uint32, error) + func (r *Result) Uint64() (uint64, error) + func (r *Result) Uint64Slice() ([]uint64, error) + func (r *Result) Uint8() (uint8, error) + func (r *Result) Uint8Slice() ([]uint8, error) + func (r *Result) UintSlice() ([]uint, error) Other modules containing this package github.com/thedevsaddam/gojsonq