Documentation ¶
Index ¶
- func BuildJSONBytes(kvPairs ...interface{}) []byte
- func BuildJSONString(kvPairs ...interface{}) string
- func ToJSONValString(val interface{}) string
- type JSONBuilder
- func (this *JSONBuilder) Add(key string, val interface{}) *JSONBuilder
- func (this *JSONBuilder) AddAny(strs ...string) *JSONBuilder
- func (this *JSONBuilder) AddEscapeStr(key string, val string) *JSONBuilder
- func (this *JSONBuilder) AddKey(key string) *JSONBuilder
- func (this *JSONBuilder) AddObject(kvPairs ...interface{}) *JSONBuilder
- func (this *JSONBuilder) AddObjectEx(valfunc func(val interface{}) interface{}, kvPairs ...interface{}) *JSONBuilder
- func (this *JSONBuilder) AddValues(kvPairs ...interface{}) *JSONBuilder
- func (this *JSONBuilder) AddValuesEx(valfunc func(val interface{}) interface{}, kvPairs ...interface{}) *JSONBuilder
- func (this *JSONBuilder) ArrayBegin() *JSONBuilder
- func (this *JSONBuilder) ArrayEnd() *JSONBuilder
- func (this *JSONBuilder) Bytes() []byte
- func (this *JSONBuilder) EscapeSimpleVal(val interface{}) interface{}
- func (this *JSONBuilder) EscapeVal(val interface{}) interface{}
- func (this *JSONBuilder) Length() int
- func (this *JSONBuilder) ObjectBegin() *JSONBuilder
- func (this *JSONBuilder) ObjectEnd() *JSONBuilder
- func (this *JSONBuilder) Reset() *JSONBuilder
- func (this *JSONBuilder) Spliter() *JSONBuilder
- func (this *JSONBuilder) String() string
- type JSONDecode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildJSONBytes ¶
func BuildJSONBytes(kvPairs ...interface{}) []byte
func BuildJSONString ¶
func BuildJSONString(kvPairs ...interface{}) string
func ToJSONValString ¶
func ToJSONValString(val interface{}) string
Types ¶
type JSONBuilder ¶
type JSONBuilder struct {
// contains filtered or unexported fields
}
func NewJSONBuilder ¶
func NewJSONBuilder() *JSONBuilder
func (*JSONBuilder) Add ¶
func (this *JSONBuilder) Add(key string, val interface{}) *JSONBuilder
func (*JSONBuilder) AddAny ¶
func (this *JSONBuilder) AddAny(strs ...string) *JSONBuilder
func (*JSONBuilder) AddEscapeStr ¶
func (this *JSONBuilder) AddEscapeStr(key string, val string) *JSONBuilder
func (*JSONBuilder) AddKey ¶
func (this *JSONBuilder) AddKey(key string) *JSONBuilder
func (*JSONBuilder) AddObject ¶
func (this *JSONBuilder) AddObject(kvPairs ...interface{}) *JSONBuilder
func (*JSONBuilder) AddObjectEx ¶
func (this *JSONBuilder) AddObjectEx(valfunc func(val interface{}) interface{}, kvPairs ...interface{}) *JSONBuilder
func (*JSONBuilder) AddValues ¶
func (this *JSONBuilder) AddValues(kvPairs ...interface{}) *JSONBuilder
func (*JSONBuilder) AddValuesEx ¶
func (this *JSONBuilder) AddValuesEx(valfunc func(val interface{}) interface{}, kvPairs ...interface{}) *JSONBuilder
func (*JSONBuilder) ArrayBegin ¶
func (this *JSONBuilder) ArrayBegin() *JSONBuilder
func (*JSONBuilder) ArrayEnd ¶
func (this *JSONBuilder) ArrayEnd() *JSONBuilder
func (*JSONBuilder) Bytes ¶
func (this *JSONBuilder) Bytes() []byte
func (*JSONBuilder) EscapeSimpleVal ¶
func (this *JSONBuilder) EscapeSimpleVal(val interface{}) interface{}
func (*JSONBuilder) EscapeVal ¶
func (this *JSONBuilder) EscapeVal(val interface{}) interface{}
func (*JSONBuilder) Length ¶
func (this *JSONBuilder) Length() int
func (*JSONBuilder) ObjectBegin ¶
func (this *JSONBuilder) ObjectBegin() *JSONBuilder
func (*JSONBuilder) ObjectEnd ¶
func (this *JSONBuilder) ObjectEnd() *JSONBuilder
func (*JSONBuilder) Reset ¶
func (this *JSONBuilder) Reset() *JSONBuilder
func (*JSONBuilder) Spliter ¶
func (this *JSONBuilder) Spliter() *JSONBuilder
func (*JSONBuilder) String ¶
func (this *JSONBuilder) String() string
type JSONDecode ¶
type JSONDecode struct {
// contains filtered or unexported fields
}
func NewJSONDecode ¶
func NewJSONDecode() *JSONDecode
func (*JSONDecode) InputBuf ¶
func (this *JSONDecode) InputBuf(buf []byte, onjson func(jsonstr string))
func (*JSONDecode) InputByte ¶
func (this *JSONDecode) InputByte(val byte) (rval int)
func (*JSONDecode) String ¶
func (this *JSONDecode) String() string
Click to show internal directories.
Click to hide internal directories.