Documentation
¶
Index ¶
- Constants
- Variables
- type ASTNodePlugin
- type ASTNodePluginFunc
- type AST_NODETYPE
- type JsonArrayNode
- func (node *JsonArrayNode) AddPlugin(p ASTNodePlugin)
- func (node *JsonArrayNode) Append(n JsonNode)
- func (node *JsonArrayNode) GetMeta(key string) interface{}
- func (node *JsonArrayNode) GetNodeType() AST_NODETYPE
- func (node *JsonArrayNode) IsChildVisited() bool
- func (node *JsonArrayNode) IsVisited() bool
- func (node *JsonArrayNode) Length() int
- func (node *JsonArrayNode) PrependPlugin(p ASTNodePlugin)
- func (node *JsonArrayNode) RemovePlugin(name string)
- func (node *JsonArrayNode) ResetVisited()
- func (node *JsonArrayNode) SetChildVisited()
- func (node *JsonArrayNode) SetMeta(key string, value interface{})
- func (node *JsonArrayNode) SetVisited()
- func (node *JsonArrayNode) String() string
- func (node *JsonArrayNode) UnsetVisited()
- func (node *JsonArrayNode) Visit(visitor JsonVisitor) error
- type JsonBooleanNode
- func (node *JsonBooleanNode) AddPlugin(p ASTNodePlugin)
- func (node *JsonBooleanNode) GetMeta(key string) interface{}
- func (node *JsonBooleanNode) GetNodeType() AST_NODETYPE
- func (node *JsonBooleanNode) IsVisited() bool
- func (node *JsonBooleanNode) PrependPlugin(p ASTNodePlugin)
- func (node *JsonBooleanNode) RemovePlugin(name string)
- func (node *JsonBooleanNode) SetMeta(key string, value interface{})
- func (node *JsonBooleanNode) SetVisited()
- func (node *JsonBooleanNode) String() string
- func (node *JsonBooleanNode) UnsetVisited()
- func (node *JsonBooleanNode) Visit(visitor JsonVisitor) error
- type JsonCollectionNode
- type JsonExtendedStringWIthVariableNode
- func (node *JsonExtendedStringWIthVariableNode) AddPlugin(p ASTNodePlugin)
- func (node *JsonExtendedStringWIthVariableNode) GetMeta(key string) interface{}
- func (node *JsonExtendedStringWIthVariableNode) GetNodeType() AST_NODETYPE
- func (node *JsonExtendedStringWIthVariableNode) GetValue() (string, error)
- func (node *JsonExtendedStringWIthVariableNode) IsVisited() bool
- func (node *JsonExtendedStringWIthVariableNode) PrependPlugin(p ASTNodePlugin)
- func (node *JsonExtendedStringWIthVariableNode) RemovePlugin(name string)
- func (node *JsonExtendedStringWIthVariableNode) SetMeta(key string, value interface{})
- func (node *JsonExtendedStringWIthVariableNode) SetVisited()
- func (node *JsonExtendedStringWIthVariableNode) String() string
- func (node *JsonExtendedStringWIthVariableNode) UnsetVisited()
- func (node *JsonExtendedStringWIthVariableNode) Visit(visitor JsonVisitor) error
- type JsonExtendedVariableNode
- func (node *JsonExtendedVariableNode) AddPlugin(p ASTNodePlugin)
- func (node *JsonExtendedVariableNode) GetMeta(key string) interface{}
- func (node *JsonExtendedVariableNode) GetNodeType() AST_NODETYPE
- func (node *JsonExtendedVariableNode) IsVisited() bool
- func (node *JsonExtendedVariableNode) PrependPlugin(p ASTNodePlugin)
- func (node *JsonExtendedVariableNode) RemovePlugin(name string)
- func (node *JsonExtendedVariableNode) SetMeta(key string, value interface{})
- func (node *JsonExtendedVariableNode) SetVisited()
- func (node *JsonExtendedVariableNode) String() string
- func (node *JsonExtendedVariableNode) UnsetVisited()
- func (node *JsonExtendedVariableNode) Visit(visitor JsonVisitor) error
- type JsonKeyValuePairNode
- func (node *JsonKeyValuePairNode) AddPlugin(p ASTNodePlugin)
- func (node *JsonKeyValuePairNode) GetMeta(key string) interface{}
- func (node *JsonKeyValuePairNode) GetNodeType() AST_NODETYPE
- func (node *JsonKeyValuePairNode) IsFilled() bool
- func (node *JsonKeyValuePairNode) IsVisited() bool
- func (node *JsonKeyValuePairNode) PrependPlugin(p ASTNodePlugin)
- func (node *JsonKeyValuePairNode) RemovePlugin(name string)
- func (node *JsonKeyValuePairNode) SetMeta(key string, value interface{})
- func (node *JsonKeyValuePairNode) SetVisited()
- func (node *JsonKeyValuePairNode) String() string
- func (node *JsonKeyValuePairNode) UnsetVisited()
- func (node *JsonKeyValuePairNode) Visit(visitor JsonVisitor) error
- type JsonNode
- type JsonNullNode
- func (node *JsonNullNode) AddPlugin(p ASTNodePlugin)
- func (node *JsonNullNode) GetMeta(key string) interface{}
- func (node *JsonNullNode) GetNodeType() AST_NODETYPE
- func (node *JsonNullNode) IsVisited() bool
- func (node *JsonNullNode) PrependPlugin(p ASTNodePlugin)
- func (node *JsonNullNode) RemovePlugin(name string)
- func (node *JsonNullNode) SetMeta(key string, value interface{})
- func (node *JsonNullNode) SetVisited()
- func (node *JsonNullNode) String() string
- func (node *JsonNullNode) UnsetVisited()
- func (node *JsonNullNode) Visit(visitor JsonVisitor) error
- type JsonNumberNode
- func (node *JsonNumberNode) AddPlugin(p ASTNodePlugin)
- func (node *JsonNumberNode) GetMeta(key string) interface{}
- func (node *JsonNumberNode) GetNodeType() AST_NODETYPE
- func (node *JsonNumberNode) IsVisited() bool
- func (node *JsonNumberNode) PrependPlugin(p ASTNodePlugin)
- func (node *JsonNumberNode) RemovePlugin(name string)
- func (node *JsonNumberNode) SetMeta(key string, value interface{})
- func (node *JsonNumberNode) SetVisited()
- func (node *JsonNumberNode) String() string
- func (node *JsonNumberNode) UnsetVisited()
- func (node *JsonNumberNode) Visit(visitor JsonVisitor) error
- type JsonObjectNode
- func (node *JsonObjectNode) AddPlugin(p ASTNodePlugin)
- func (node *JsonObjectNode) Append(kvNode *JsonKeyValuePairNode)
- func (node *JsonObjectNode) GetMeta(key string) interface{}
- func (node *JsonObjectNode) GetNodeType() AST_NODETYPE
- func (node *JsonObjectNode) IsChildVisited() bool
- func (node *JsonObjectNode) IsVisited() bool
- func (node *JsonObjectNode) Length() int
- func (node *JsonObjectNode) PrependPlugin(p ASTNodePlugin)
- func (node *JsonObjectNode) RemovePlugin(name string)
- func (node *JsonObjectNode) ResetVisited()
- func (node *JsonObjectNode) SetChildVisited()
- func (node *JsonObjectNode) SetMeta(key string, value interface{})
- func (node *JsonObjectNode) SetVisited()
- func (node *JsonObjectNode) String() string
- func (node *JsonObjectNode) UnsetVisited()
- func (node *JsonObjectNode) Visit(visitor JsonVisitor) error
- type JsonStringNode
- func (node *JsonStringNode) AddPlugin(p ASTNodePlugin)
- func (node *JsonStringNode) GetMeta(key string) interface{}
- func (node *JsonStringNode) GetNodeType() AST_NODETYPE
- func (node *JsonStringNode) GetValue() (string, error)
- func (node *JsonStringNode) IsVisited() bool
- func (node *JsonStringNode) PrependPlugin(p ASTNodePlugin)
- func (node *JsonStringNode) RemovePlugin(name string)
- func (node *JsonStringNode) SetMeta(key string, value interface{})
- func (node *JsonStringNode) SetVisited()
- func (node *JsonStringNode) String() string
- func (node *JsonStringNode) ToArrayNode() (*JsonArrayNode, error)
- func (node *JsonStringNode) UnsetVisited()
- func (node *JsonStringNode) Visit(visitor JsonVisitor) error
- type JsonStringValueNode
- type JsonVisitor
- type JsonextAST
- func (i *JsonextAST) CreateNewASTNode(t AST_NODETYPE, value interface{}) (JsonNode, error)
- func (i *JsonextAST) EncloseLatestElements() (JsonNode, error)
- func (i *JsonextAST) GetAST() JsonNode
- func (i *JsonextAST) HasComplete() bool
- func (i *JsonextAST) HasOpenElement() bool
- func (i *JsonextAST) TopElementType() (AST_NODETYPE, error)
- type MarshalerFunc
- type NodeVisitor
- type UnmarshalerFunc
Constants ¶
View Source
const ( AST_STATE_INIT astState = iota AST_STATE_INTERMIDIEATE AST_STATE_FINISHED )
Variables ¶
View Source
var ( ErrorASTComplete = errors.New("cannot create new ast node when the ast has finished") ErrorASTStackInvalidElement = errors.New("ast trace stack will only contain: kv, array, object, no primitive values") ErrorASTUnexpectedElement = errors.New("unexecpted stack element type") ErrorASTUnexpectedOwnerElement = errors.New("unexecpted stack owner element type") ErrorASTStackEmpty = errors.New("unexecpted stack empty") ErrorASTEncloseElementType = errors.New("enclose element type must be array or object") ErrorASTIncorrectNodeType = errors.New("incorrect node type") ErrorASTKeyValuePairNotStringAsKey = errors.New("object key should be string") )
Functions ¶
This section is empty.
Types ¶
type ASTNodePlugin ¶ added in v0.4.2
type ASTNodePlugin interface { PreVisitPlugin(visitor JsonVisitor, node JsonNode) error PostVisitPlugin(visitor JsonVisitor, node JsonNode) error PluginName() string }
func NewASTNodePlugin ¶ added in v0.4.2
func NewASTNodePlugin(name string, preVisitFunc ASTNodePluginFunc, postVisitFunc ASTNodePluginFunc) ASTNodePlugin
type ASTNodePluginFunc ¶ added in v0.4.2
type ASTNodePluginFunc func(visitor JsonVisitor, pluginHolder JsonNode) error
type AST_NODETYPE ¶
type AST_NODETYPE byte
const ( AST_NODE_TYPE_BOUNDARY AST_NODETYPE = 200 AST_ARRAY AST_NODETYPE = 201 AST_OBJECT AST_NODETYPE = 202 AST_KVPAIR AST_NODETYPE = 203 AST_VARIABLE AST_NODETYPE = 204 AST_STRING_VARIABLE AST_NODETYPE = 205 AST_STRING AST_NODETYPE = 206 AST_NUMBER AST_NODETYPE = 207 AST_BOOLEAN AST_NODETYPE = 208 AST_NULL AST_NODETYPE = 209 AST_NODE_UNDEFINED AST_NODETYPE = 210 )
func (AST_NODETYPE) Byte ¶ added in v0.3.2
func (a AST_NODETYPE) Byte() byte
type JsonArrayNode ¶
type JsonArrayNode struct { Value []JsonNode // contains filtered or unexported fields }
func (*JsonArrayNode) AddPlugin ¶ added in v0.4.2
func (node *JsonArrayNode) AddPlugin(p ASTNodePlugin)
func (*JsonArrayNode) Append ¶
func (node *JsonArrayNode) Append(n JsonNode)
func (*JsonArrayNode) GetMeta ¶ added in v0.4.2
func (node *JsonArrayNode) GetMeta(key string) interface{}
func (*JsonArrayNode) GetNodeType ¶
func (node *JsonArrayNode) GetNodeType() AST_NODETYPE
func (*JsonArrayNode) IsChildVisited ¶ added in v0.4.2
func (node *JsonArrayNode) IsChildVisited() bool
func (*JsonArrayNode) Length ¶ added in v0.3.0
func (node *JsonArrayNode) Length() int
func (*JsonArrayNode) PrependPlugin ¶ added in v0.4.2
func (node *JsonArrayNode) PrependPlugin(p ASTNodePlugin)
func (*JsonArrayNode) RemovePlugin ¶ added in v0.4.2
func (node *JsonArrayNode) RemovePlugin(name string)
func (*JsonArrayNode) ResetVisited ¶ added in v0.4.2
func (node *JsonArrayNode) ResetVisited()
unset all the child's visited state as well as the node's, so that you can revisit the array node again
func (*JsonArrayNode) SetChildVisited ¶ added in v0.4.2
func (node *JsonArrayNode) SetChildVisited()
set all the child nodes as visited, will not mark the node itself as visited, so that you can visit the array node for stateful purpose
func (*JsonArrayNode) SetMeta ¶ added in v0.4.2
func (node *JsonArrayNode) SetMeta(key string, value interface{})
func (*JsonArrayNode) SetVisited ¶ added in v0.4.2
func (node *JsonArrayNode) SetVisited()
func (*JsonArrayNode) String ¶ added in v0.4.0
func (node *JsonArrayNode) String() string
func (*JsonArrayNode) UnsetVisited ¶ added in v0.4.2
func (node *JsonArrayNode) UnsetVisited()
func (*JsonArrayNode) Visit ¶
func (node *JsonArrayNode) Visit(visitor JsonVisitor) error
type JsonBooleanNode ¶
type JsonBooleanNode struct { Value bool // contains filtered or unexported fields }
func (*JsonBooleanNode) AddPlugin ¶ added in v0.4.2
func (node *JsonBooleanNode) AddPlugin(p ASTNodePlugin)
func (*JsonBooleanNode) GetMeta ¶ added in v0.4.2
func (node *JsonBooleanNode) GetMeta(key string) interface{}
func (*JsonBooleanNode) GetNodeType ¶
func (node *JsonBooleanNode) GetNodeType() AST_NODETYPE
func (*JsonBooleanNode) PrependPlugin ¶ added in v0.4.2
func (node *JsonBooleanNode) PrependPlugin(p ASTNodePlugin)
func (*JsonBooleanNode) RemovePlugin ¶ added in v0.4.2
func (node *JsonBooleanNode) RemovePlugin(name string)
func (*JsonBooleanNode) SetMeta ¶ added in v0.4.2
func (node *JsonBooleanNode) SetMeta(key string, value interface{})
func (*JsonBooleanNode) SetVisited ¶ added in v0.4.2
func (node *JsonBooleanNode) SetVisited()
func (*JsonBooleanNode) String ¶ added in v0.4.0
func (node *JsonBooleanNode) String() string
func (*JsonBooleanNode) UnsetVisited ¶ added in v0.4.2
func (node *JsonBooleanNode) UnsetVisited()
func (*JsonBooleanNode) Visit ¶
func (node *JsonBooleanNode) Visit(visitor JsonVisitor) error
type JsonCollectionNode ¶ added in v0.3.0
type JsonExtendedStringWIthVariableNode ¶
type JsonExtendedStringWIthVariableNode struct { JsonStringNode Variables map[string][]byte }
func (*JsonExtendedStringWIthVariableNode) AddPlugin ¶ added in v0.4.2
func (node *JsonExtendedStringWIthVariableNode) AddPlugin(p ASTNodePlugin)
func (*JsonExtendedStringWIthVariableNode) GetMeta ¶ added in v0.4.2
func (node *JsonExtendedStringWIthVariableNode) GetMeta(key string) interface{}
func (*JsonExtendedStringWIthVariableNode) GetNodeType ¶
func (node *JsonExtendedStringWIthVariableNode) GetNodeType() AST_NODETYPE
func (*JsonExtendedStringWIthVariableNode) GetValue ¶ added in v0.3.0
func (node *JsonExtendedStringWIthVariableNode) GetValue() (string, error)
func (*JsonExtendedStringWIthVariableNode) IsVisited ¶ added in v0.4.2
func (node *JsonExtendedStringWIthVariableNode) IsVisited() bool
func (*JsonExtendedStringWIthVariableNode) PrependPlugin ¶ added in v0.4.2
func (node *JsonExtendedStringWIthVariableNode) PrependPlugin(p ASTNodePlugin)
func (*JsonExtendedStringWIthVariableNode) RemovePlugin ¶ added in v0.4.2
func (node *JsonExtendedStringWIthVariableNode) RemovePlugin(name string)
func (*JsonExtendedStringWIthVariableNode) SetMeta ¶ added in v0.4.2
func (node *JsonExtendedStringWIthVariableNode) SetMeta(key string, value interface{})
func (*JsonExtendedStringWIthVariableNode) SetVisited ¶ added in v0.4.2
func (node *JsonExtendedStringWIthVariableNode) SetVisited()
func (*JsonExtendedStringWIthVariableNode) String ¶ added in v0.4.0
func (node *JsonExtendedStringWIthVariableNode) String() string
func (*JsonExtendedStringWIthVariableNode) UnsetVisited ¶ added in v0.4.2
func (node *JsonExtendedStringWIthVariableNode) UnsetVisited()
func (*JsonExtendedStringWIthVariableNode) Visit ¶
func (node *JsonExtendedStringWIthVariableNode) Visit(visitor JsonVisitor) error
type JsonExtendedVariableNode ¶
type JsonExtendedVariableNode struct { Value []byte Variable string // contains filtered or unexported fields }
func (*JsonExtendedVariableNode) AddPlugin ¶ added in v0.4.2
func (node *JsonExtendedVariableNode) AddPlugin(p ASTNodePlugin)
func (*JsonExtendedVariableNode) GetMeta ¶ added in v0.4.2
func (node *JsonExtendedVariableNode) GetMeta(key string) interface{}
func (*JsonExtendedVariableNode) GetNodeType ¶
func (node *JsonExtendedVariableNode) GetNodeType() AST_NODETYPE
func (*JsonExtendedVariableNode) IsVisited ¶ added in v0.4.2
func (node *JsonExtendedVariableNode) IsVisited() bool
func (*JsonExtendedVariableNode) PrependPlugin ¶ added in v0.4.2
func (node *JsonExtendedVariableNode) PrependPlugin(p ASTNodePlugin)
func (*JsonExtendedVariableNode) RemovePlugin ¶ added in v0.4.2
func (node *JsonExtendedVariableNode) RemovePlugin(name string)
func (*JsonExtendedVariableNode) SetMeta ¶ added in v0.4.2
func (node *JsonExtendedVariableNode) SetMeta(key string, value interface{})
func (*JsonExtendedVariableNode) SetVisited ¶ added in v0.4.2
func (node *JsonExtendedVariableNode) SetVisited()
func (*JsonExtendedVariableNode) String ¶ added in v0.4.0
func (node *JsonExtendedVariableNode) String() string
func (*JsonExtendedVariableNode) UnsetVisited ¶ added in v0.4.2
func (node *JsonExtendedVariableNode) UnsetVisited()
func (*JsonExtendedVariableNode) Visit ¶
func (node *JsonExtendedVariableNode) Visit(visitor JsonVisitor) error
type JsonKeyValuePairNode ¶
type JsonKeyValuePairNode struct { Key JsonStringValueNode Value JsonNode // contains filtered or unexported fields }
func (*JsonKeyValuePairNode) AddPlugin ¶ added in v0.4.2
func (node *JsonKeyValuePairNode) AddPlugin(p ASTNodePlugin)
func (*JsonKeyValuePairNode) GetMeta ¶ added in v0.4.2
func (node *JsonKeyValuePairNode) GetMeta(key string) interface{}
func (*JsonKeyValuePairNode) GetNodeType ¶
func (node *JsonKeyValuePairNode) GetNodeType() AST_NODETYPE
func (*JsonKeyValuePairNode) IsFilled ¶
func (node *JsonKeyValuePairNode) IsFilled() bool
func (*JsonKeyValuePairNode) IsVisited ¶ added in v0.4.2
func (node *JsonKeyValuePairNode) IsVisited() bool
func (*JsonKeyValuePairNode) PrependPlugin ¶ added in v0.4.2
func (node *JsonKeyValuePairNode) PrependPlugin(p ASTNodePlugin)
func (*JsonKeyValuePairNode) RemovePlugin ¶ added in v0.4.2
func (node *JsonKeyValuePairNode) RemovePlugin(name string)
func (*JsonKeyValuePairNode) SetMeta ¶ added in v0.4.2
func (node *JsonKeyValuePairNode) SetMeta(key string, value interface{})
func (*JsonKeyValuePairNode) SetVisited ¶ added in v0.4.2
func (node *JsonKeyValuePairNode) SetVisited()
func (*JsonKeyValuePairNode) String ¶ added in v0.4.0
func (node *JsonKeyValuePairNode) String() string
func (*JsonKeyValuePairNode) UnsetVisited ¶ added in v0.4.2
func (node *JsonKeyValuePairNode) UnsetVisited()
func (*JsonKeyValuePairNode) Visit ¶
func (node *JsonKeyValuePairNode) Visit(visitor JsonVisitor) error
type JsonNode ¶
type JsonNode interface { GetNodeType() AST_NODETYPE Visit(visitor JsonVisitor) error SetVisited() IsVisited() bool UnsetVisited() String() string SetMeta(key string, value interface{}) GetMeta(key string) interface{} AddPlugin(p ASTNodePlugin) RemovePlugin(name string) PrependPlugin(p ASTNodePlugin) }
func NodeFactory ¶ added in v0.4.0
func NodeFactory(t AST_NODETYPE, value interface{}) (JsonNode, error)
type JsonNullNode ¶
type JsonNullNode struct { Value interface{} // contains filtered or unexported fields }
func (*JsonNullNode) AddPlugin ¶ added in v0.4.2
func (node *JsonNullNode) AddPlugin(p ASTNodePlugin)
func (*JsonNullNode) GetMeta ¶ added in v0.4.2
func (node *JsonNullNode) GetMeta(key string) interface{}
func (*JsonNullNode) GetNodeType ¶
func (node *JsonNullNode) GetNodeType() AST_NODETYPE
func (*JsonNullNode) PrependPlugin ¶ added in v0.4.2
func (node *JsonNullNode) PrependPlugin(p ASTNodePlugin)
func (*JsonNullNode) RemovePlugin ¶ added in v0.4.2
func (node *JsonNullNode) RemovePlugin(name string)
func (*JsonNullNode) SetMeta ¶ added in v0.4.2
func (node *JsonNullNode) SetMeta(key string, value interface{})
func (*JsonNullNode) SetVisited ¶ added in v0.4.2
func (node *JsonNullNode) SetVisited()
func (*JsonNullNode) String ¶ added in v0.4.0
func (node *JsonNullNode) String() string
func (*JsonNullNode) UnsetVisited ¶ added in v0.4.2
func (node *JsonNullNode) UnsetVisited()
func (*JsonNullNode) Visit ¶
func (node *JsonNullNode) Visit(visitor JsonVisitor) error
type JsonNumberNode ¶
type JsonNumberNode struct { Value interface{} // contains filtered or unexported fields }
func (*JsonNumberNode) AddPlugin ¶ added in v0.4.2
func (node *JsonNumberNode) AddPlugin(p ASTNodePlugin)
func (*JsonNumberNode) GetMeta ¶ added in v0.4.2
func (node *JsonNumberNode) GetMeta(key string) interface{}
func (*JsonNumberNode) GetNodeType ¶
func (node *JsonNumberNode) GetNodeType() AST_NODETYPE
func (*JsonNumberNode) PrependPlugin ¶ added in v0.4.2
func (node *JsonNumberNode) PrependPlugin(p ASTNodePlugin)
func (*JsonNumberNode) RemovePlugin ¶ added in v0.4.2
func (node *JsonNumberNode) RemovePlugin(name string)
func (*JsonNumberNode) SetMeta ¶ added in v0.4.2
func (node *JsonNumberNode) SetMeta(key string, value interface{})
func (*JsonNumberNode) SetVisited ¶ added in v0.4.2
func (node *JsonNumberNode) SetVisited()
func (*JsonNumberNode) String ¶ added in v0.4.0
func (node *JsonNumberNode) String() string
func (*JsonNumberNode) UnsetVisited ¶ added in v0.4.2
func (node *JsonNumberNode) UnsetVisited()
func (*JsonNumberNode) Visit ¶
func (node *JsonNumberNode) Visit(visitor JsonVisitor) error
type JsonObjectNode ¶
type JsonObjectNode struct { Value []*JsonKeyValuePairNode // contains filtered or unexported fields }
func (*JsonObjectNode) AddPlugin ¶ added in v0.4.2
func (node *JsonObjectNode) AddPlugin(p ASTNodePlugin)
func (*JsonObjectNode) Append ¶
func (node *JsonObjectNode) Append(kvNode *JsonKeyValuePairNode)
func (*JsonObjectNode) GetMeta ¶ added in v0.4.2
func (node *JsonObjectNode) GetMeta(key string) interface{}
func (*JsonObjectNode) GetNodeType ¶
func (node *JsonObjectNode) GetNodeType() AST_NODETYPE
func (*JsonObjectNode) IsChildVisited ¶ added in v0.4.2
func (node *JsonObjectNode) IsChildVisited() bool
func (*JsonObjectNode) Length ¶ added in v0.3.0
func (node *JsonObjectNode) Length() int
func (*JsonObjectNode) PrependPlugin ¶ added in v0.4.2
func (node *JsonObjectNode) PrependPlugin(p ASTNodePlugin)
func (*JsonObjectNode) RemovePlugin ¶ added in v0.4.2
func (node *JsonObjectNode) RemovePlugin(name string)
func (*JsonObjectNode) ResetVisited ¶ added in v0.4.2
func (node *JsonObjectNode) ResetVisited()
unset all the child's visited state as well as the node's, so that you can revisit the array node again
func (*JsonObjectNode) SetChildVisited ¶ added in v0.4.2
func (node *JsonObjectNode) SetChildVisited()
set all the child nodes as visited, will not mark the node itself as visited, so that you can visit the object node for stateful purpose
func (*JsonObjectNode) SetMeta ¶ added in v0.4.2
func (node *JsonObjectNode) SetMeta(key string, value interface{})
func (*JsonObjectNode) SetVisited ¶ added in v0.4.2
func (node *JsonObjectNode) SetVisited()
func (*JsonObjectNode) String ¶ added in v0.4.0
func (node *JsonObjectNode) String() string
func (*JsonObjectNode) UnsetVisited ¶ added in v0.4.2
func (node *JsonObjectNode) UnsetVisited()
func (*JsonObjectNode) Visit ¶
func (node *JsonObjectNode) Visit(visitor JsonVisitor) error
type JsonStringNode ¶
type JsonStringNode struct { Value []byte // contains filtered or unexported fields }
func (*JsonStringNode) AddPlugin ¶ added in v0.4.2
func (node *JsonStringNode) AddPlugin(p ASTNodePlugin)
func (*JsonStringNode) GetMeta ¶ added in v0.4.2
func (node *JsonStringNode) GetMeta(key string) interface{}
func (*JsonStringNode) GetNodeType ¶
func (node *JsonStringNode) GetNodeType() AST_NODETYPE
func (*JsonStringNode) GetValue ¶ added in v0.3.0
func (node *JsonStringNode) GetValue() (string, error)
func (*JsonStringNode) PrependPlugin ¶ added in v0.4.2
func (node *JsonStringNode) PrependPlugin(p ASTNodePlugin)
func (*JsonStringNode) RemovePlugin ¶ added in v0.4.2
func (node *JsonStringNode) RemovePlugin(name string)
func (*JsonStringNode) SetMeta ¶ added in v0.4.2
func (node *JsonStringNode) SetMeta(key string, value interface{})
func (*JsonStringNode) SetVisited ¶ added in v0.4.2
func (node *JsonStringNode) SetVisited()
func (*JsonStringNode) String ¶ added in v0.4.0
func (node *JsonStringNode) String() string
func (*JsonStringNode) ToArrayNode ¶ added in v0.3.0
func (node *JsonStringNode) ToArrayNode() (*JsonArrayNode, error)
func (*JsonStringNode) UnsetVisited ¶ added in v0.4.2
func (node *JsonStringNode) UnsetVisited()
func (*JsonStringNode) Visit ¶
func (node *JsonStringNode) Visit(visitor JsonVisitor) error
type JsonStringValueNode ¶ added in v0.3.0
type JsonVisitor ¶
type JsonVisitor interface { VisitStringNode(node *JsonStringNode) error VisitNumberNode(node *JsonNumberNode) error VisitBooleanNode(node *JsonBooleanNode) error VisitNullNode(node *JsonNullNode) error VisitArrayNode(node *JsonArrayNode) error VisitKeyValuePairNode(node *JsonKeyValuePairNode) error VisitObjectNode(node *JsonObjectNode) error VisitVariableNode(node *JsonExtendedVariableNode) error VisitStringWithVariableNode(node *JsonExtendedStringWIthVariableNode) error }
type JsonextAST ¶ added in v0.3.2
type JsonextAST struct {
// contains filtered or unexported fields
}
func NewJsonextAST ¶ added in v0.3.2
func NewJsonextAST() *JsonextAST
func (*JsonextAST) CreateNewASTNode ¶ added in v0.3.2
func (i *JsonextAST) CreateNewASTNode(t AST_NODETYPE, value interface{}) (JsonNode, error)
func (*JsonextAST) EncloseLatestElements ¶ added in v0.3.2
func (i *JsonextAST) EncloseLatestElements() (JsonNode, error)
func (*JsonextAST) GetAST ¶ added in v0.3.2
func (i *JsonextAST) GetAST() JsonNode
func (*JsonextAST) HasComplete ¶ added in v0.3.2
func (i *JsonextAST) HasComplete() bool
func (*JsonextAST) HasOpenElement ¶ added in v0.3.2
func (i *JsonextAST) HasOpenElement() bool
func (*JsonextAST) TopElementType ¶ added in v0.3.2
func (i *JsonextAST) TopElementType() (AST_NODETYPE, error)
type MarshalerFunc ¶ added in v0.4.0
type NodeVisitor ¶ added in v0.4.0
type NodeVisitor interface { VisitStringNode(node *JsonStringNode) error VisitNumberNode(node *JsonNumberNode) error VisitBooleanNode(node *JsonBooleanNode) error VisitNullNode(node *JsonNullNode) error VisitArrayNode(node *JsonArrayNode) error VisitKeyValuePairNode(node *JsonKeyValuePairNode) error VisitObjectNode(node *JsonObjectNode) error VisitVariableNode(node *JsonExtendedVariableNode) error VisitStringWithVariableNode(node *JsonExtendedStringWIthVariableNode) error }
type UnmarshalerFunc ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.