Documentation ¶
Index ¶
- Constants
- func FreeJ2TStateMachine(ret *J2TStateMachine)
- func FreeStateMachine(fsm *StateMachine)
- func FreeTStateMachine(ret *TStateMachine)
- type FieldValue
- type J2TExtra
- type J2TState
- type J2TStateMachine
- func (self *J2TStateMachine) At(i int) *J2TState
- func (self *J2TStateMachine) Drop()
- func (ret *J2TStateMachine) GrowFieldCache(n int)
- func (ret *J2TStateMachine) GrowKeyCache(n int)
- func (ret *J2TStateMachine) GrowReqCache(n int)
- func (ret *J2TStateMachine) Init(start int, desc unsafe.Pointer)
- func (self *J2TStateMachine) Next() *J2TState
- func (self *J2TStateMachine) Now() *J2TState
- func (ret *J2TStateMachine) SetPos(pos int)
- type J2T_STATE
- type JsonState
- type ParsingError
- type SearchingError
- type StateMachine
- type TState
- type TStateMachine
- type ValueType
Constants ¶
View Source
const ( MaxInt64StringLen = 21 MaxFloat64StringLen = 32 )
View Source
const ( B_DOUBLE_UNQUOTE = 0 B_UNICODE_REPLACE = 1 )
View Source
const ( // for unquote F_DOUBLE_UNQUOTE = 1 << B_DOUBLE_UNQUOTE F_UNICODE_REPLACE = 1 << B_UNICODE_REPLACE // for j2t_fsm_exec F_ALLOW_UNKNOWN = 1 F_WRITE_DEFAULT = 1 << 1 F_VALUE_MAPPING = 1 << 2 F_HTTP_MAPPING = 1 << 3 F_STRING_INT = 1 << 4 F_WRITE_REQUIRE = 1 << 5 F_NO_BASE64 = 1 << 6 F_WRITE_OPTIONAL = 1 << 7 F_TRACE_BACK = 1 << 8 )
View Source
const ( ERR_WRAP_SHIFT_CODE = 8 ERR_WRAP_SHIFT_POS = 32 )
View Source
const ( J2T_KEY_CACHE_SIZE = 1024 J2T_FIELD_CACHE_SIZE = 4096 J2T_REQS_CACHE_SIZE = 4096 J2T_DBUF_SIZE = 800 )
View Source
const ( VM_NONE uint16 = 0 VM_JSCONV uint16 = 101 )
View Source
const (
MAX_RECURSE = 4096
)
View Source
const (
SPACE_MASK = (1 << ' ') | (1 << '\t') | (1 << '\r') | (1 << '\n')
)
View Source
const (
TB_SKIP_STACK_SIZE = 1024
)
Variables ¶
This section is empty.
Functions ¶
func FreeJ2TStateMachine ¶
func FreeJ2TStateMachine(ret *J2TStateMachine)
func FreeStateMachine ¶
func FreeStateMachine(fsm *StateMachine)
func FreeTStateMachine ¶
func FreeTStateMachine(ret *TStateMachine)
Types ¶
type FieldValue ¶
type J2TStateMachine ¶
type J2TStateMachine struct { SP int JT JsonState ReqsCache []byte KeyCache []byte VT [MAX_RECURSE]J2TState SM StateMachine FieldCache []int32 FieldValueCache FieldValue }
func NewJ2TStateMachine ¶
func NewJ2TStateMachine() *J2TStateMachine
func (*J2TStateMachine) At ¶
func (self *J2TStateMachine) At(i int) *J2TState
func (*J2TStateMachine) Drop ¶
func (self *J2TStateMachine) Drop()
func (*J2TStateMachine) GrowFieldCache ¶
func (ret *J2TStateMachine) GrowFieldCache(n int)
func (*J2TStateMachine) GrowKeyCache ¶
func (ret *J2TStateMachine) GrowKeyCache(n int)
func (*J2TStateMachine) GrowReqCache ¶
func (ret *J2TStateMachine) GrowReqCache(n int)
func (*J2TStateMachine) Next ¶
func (self *J2TStateMachine) Next() *J2TState
func (*J2TStateMachine) Now ¶
func (self *J2TStateMachine) Now() *J2TState
func (*J2TStateMachine) SetPos ¶
func (ret *J2TStateMachine) SetPos(pos int)
type ParsingError ¶
type ParsingError uint
const ( ERR_EOF ParsingError = 1 ERR_INVALID_CHAR ParsingError = 2 ERR_INVALID_ESCAPE ParsingError = 3 ERR_INVALID_UNICODE ParsingError = 4 ERR_INTEGER_OVERFLOW ParsingError = 5 ERR_INVALID_NUMBER_FMT ParsingError = 6 ERR_RECURSE_EXCEED_MAX ParsingError = 7 ERR_FLOAT_INFINITY ParsingError = 8 ERR_DISMATCH_TYPE ParsingError = 9 ERR_NULL_REQUIRED ParsingError = 10 ERR_UNSUPPORT_THRIFT_TYPE ParsingError = 11 ERR_UNKNOWN_FIELD ParsingError = 12 ERR_DISMATCH_TYPE2 ParsingError = 13 ERR_DECODE_BASE64 ParsingError = 14 ERR_OOM_BM ParsingError = 16 ERR_OOM_BUF ParsingError = 17 ERR_OOM_KEY ParsingError = 18 ERR_OOM_FIELD ParsingError = 22 ERR_OOM_FVAL ParsingError = 23 ERR_HTTP_MAPPING ParsingError = 19 ERR_HTTP_MAPPING_END ParsingError = 21 ERR_UNSUPPORT_VM_TYPE ParsingError = 20 ERR_VALUE_MAPPING_END ParsingError = 24 )
func (ParsingError) Error ¶
func (self ParsingError) Error() string
func (ParsingError) Message ¶
func (self ParsingError) Message() string
type SearchingError ¶
type SearchingError uint
type StateMachine ¶
type StateMachine struct { Sp int Vt [MAX_RECURSE]int64 }
func NewStateMachine ¶
func NewStateMachine() *StateMachine
type TStateMachine ¶
type TStateMachine [TB_SKIP_STACK_SIZE]TState
func NewTStateMachine ¶
func NewTStateMachine() *TStateMachine
Click to show internal directories.
Click to hide internal directories.