jsonkit

package
v1.5.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyA = []byte("[]")
View Source
var False = []byte("false")
View Source
var True = []byte("true")

Functions

func Join

func Join[T any](enc *JsonBuffer, key string, data []T, quote bool)

func Kind

func Kind(raw string) func(string) string

func Noop

func Noop(string) string

Types

type ByteBuffer

type ByteBuffer = bytebufferpool.ByteBuffer

type Extractor

type Extractor struct {
	// contains filtered or unexported fields
}

func NewExtractor

func NewExtractor(v interface{}, co *lua.LState) (*Extractor, error)

func (*Extractor) Peek

func (e *Extractor) Peek(name string) string

type FastJSON

type FastJSON struct {
	// contains filtered or unexported fields
}

func (*FastJSON) AssertFloat64

func (f *FastJSON) AssertFloat64() (float64, bool)

func (*FastJSON) AssertFunction

func (f *FastJSON) AssertFunction() (*lua.LFunction, bool)

func (*FastJSON) AssertString

func (f *FastJSON) AssertString() (string, bool)

func (*FastJSON) Bool

func (f *FastJSON) Bool(L *lua.LState) int

func (*FastJSON) Hijack

func (f *FastJSON) Hijack(*lua.CallFrameFSM) bool

func (*FastJSON) Index

func (f *FastJSON) Index(L *lua.LState, key string) lua.LValue

func (*FastJSON) Int

func (f *FastJSON) Int(L *lua.LState) int

func (*FastJSON) Meta

func (f *FastJSON) Meta(L *lua.LState, key lua.LValue) lua.LValue

func (*FastJSON) NewIndex

func (f *FastJSON) NewIndex(L *lua.LState, key string, val lua.LValue)

func (*FastJSON) Parse

func (f *FastJSON) Parse(body string) error

func (*FastJSON) ParseBytes

func (f *FastJSON) ParseBytes(body []byte) error

func (*FastJSON) Str

func (f *FastJSON) Str(L *lua.LState) int

func (*FastJSON) String

func (f *FastJSON) String() string

func (*FastJSON) Type

func (f *FastJSON) Type() lua.LValueType

type JsonBuffer

type JsonBuffer struct {
	// contains filtered or unexported fields
}

func NewJson

func NewJson() *JsonBuffer

func (*JsonBuffer) Append

func (j *JsonBuffer) Append(val []byte)

func (*JsonBuffer) Arr

func (j *JsonBuffer) Arr(name string)

func (*JsonBuffer) Bool

func (j *JsonBuffer) Bool(v bool)

func (*JsonBuffer) Buffer

func (j *JsonBuffer) Buffer() *ByteBuffer

func (*JsonBuffer) Bytes

func (j *JsonBuffer) Bytes() []byte

func (*JsonBuffer) Char

func (j *JsonBuffer) Char(ch byte)

func (*JsonBuffer) Copy

func (j *JsonBuffer) Copy(val []byte)

func (*JsonBuffer) End

func (j *JsonBuffer) End(val string)

func (*JsonBuffer) False

func (j *JsonBuffer) False(key string)

func (*JsonBuffer) Insert

func (j *JsonBuffer) Insert(v []byte)

func (*JsonBuffer) Int

func (j *JsonBuffer) Int(n int)

func (*JsonBuffer) Join

func (j *JsonBuffer) Join(key string, v []string)

func (*JsonBuffer) Join2

func (j *JsonBuffer) Join2(key string, v []interface{})

func (*JsonBuffer) KB

func (j *JsonBuffer) KB(key string, b bool)

func (*JsonBuffer) KF64

func (j *JsonBuffer) KF64(key string, v float64)

func (*JsonBuffer) KI

func (j *JsonBuffer) KI(key string, n int)

func (*JsonBuffer) KL

func (j *JsonBuffer) KL(key string, n int64)

func (*JsonBuffer) KT

func (j *JsonBuffer) KT(key string, t time.Time)

func (*JsonBuffer) KUL

func (j *JsonBuffer) KUL(key string, n uint64)

func (*JsonBuffer) KV

func (j *JsonBuffer) KV(key string, s interface{})

func (*JsonBuffer) Key

func (j *JsonBuffer) Key(key string)

func (*JsonBuffer) Long

func (j *JsonBuffer) Long(n int64)

func (*JsonBuffer) Marshal

func (j *JsonBuffer) Marshal(key string, v interface{}) error

func (*JsonBuffer) NoKeyJoin

func (j *JsonBuffer) NoKeyJoin(v []string)

func (*JsonBuffer) NoKeyJoin2

func (j *JsonBuffer) NoKeyJoin2(v []interface{})

func (*JsonBuffer) Raw

func (j *JsonBuffer) Raw(key string, val []byte)

func (*JsonBuffer) Tab

func (j *JsonBuffer) Tab(name string)

func (*JsonBuffer) ToBytes

func (j *JsonBuffer) ToBytes(key string, v []byte)

func (*JsonBuffer) ToStr

func (j *JsonBuffer) ToStr(key string, v string)

func (*JsonBuffer) True

func (j *JsonBuffer) True(key string)

func (*JsonBuffer) ULong

func (j *JsonBuffer) ULong(n uint64)

func (*JsonBuffer) V

func (j *JsonBuffer) V(v interface{})

func (*JsonBuffer) V1

func (j *JsonBuffer) V1(v string)

func (*JsonBuffer) V2

func (j *JsonBuffer) V2(v string)

func (*JsonBuffer) Val

func (j *JsonBuffer) Val(v string)

func (*JsonBuffer) Write

func (j *JsonBuffer) Write(val []byte)

func (*JsonBuffer) WriteByte

func (j *JsonBuffer) WriteByte(ch byte)

func (*JsonBuffer) WriteString

func (j *JsonBuffer) WriteString(val string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL