Documentation ¶
Index ¶
- Variables
- type JSON
- func (j *JSON) AppendAnyJSONBytes(input []byte) (ref int, err error)
- func (j *JSON) AppendArray(input []byte) (ref int, err error)
- func (j *JSON) AppendErrorWithMessage(message string, errorPath []PathElement) int
- func (j *JSON) AppendJSON(another *JSON) (nodeRef, storageOffset, nodeOffset int)
- func (j *JSON) AppendNonNullableFieldIsNullErr(fieldPath string, errorPath []PathElement) int
- func (j *JSON) AppendObject(input []byte) (ref int, err error)
- func (j *JSON) AppendStringBytes(input []byte) int
- func (j *JSON) DebugPrintNode(ref int) string
- func (j *JSON) Get(nodeRef int, path []string) int
- func (j *JSON) GetObjectField(nodeRef int, path string) int
- func (j *JSON) GetObjectFieldBytes(nodeRef int, path []byte) int
- func (j *JSON) InitResolvable(initialData []byte) (dataRoot, errorsRoot int, err error)
- func (j *JSON) MergeArrays(left, right int)
- func (j *JSON) MergeNodes(left, right int) int
- func (j *JSON) MergeNodesWithPath(left, right int, path []string) int
- func (j *JSON) MergeObjects(nodeRefs []int) int
- func (j *JSON) NodeIsDefined(ref int) bool
- func (j *JSON) ObjectFieldKey(objectFieldRef int) []byte
- func (j *JSON) ObjectFieldValue(objectFieldRef int) int
- func (j *JSON) ParseArray(input []byte) (err error)
- func (j *JSON) ParseObject(input []byte) (err error)
- func (j *JSON) PrintNode(node Node, out io.Writer) error
- func (j *JSON) PrintObjectFlat(ref int, out io.Writer) (err error)
- func (j *JSON) PrintRoot(out io.Writer) error
- func (j *JSON) Reset()
- func (j *JSON) SetObjectField(nodeRef, setFieldNodeRef int, path []string) bool
- type Node
- type NodeKind
- type PathElement
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type JSON ¶
func (*JSON) AppendAnyJSONBytes ¶
func (*JSON) AppendErrorWithMessage ¶
func (j *JSON) AppendErrorWithMessage(message string, errorPath []PathElement) int
func (*JSON) AppendJSON ¶
func (*JSON) AppendNonNullableFieldIsNullErr ¶
func (j *JSON) AppendNonNullableFieldIsNullErr(fieldPath string, errorPath []PathElement) int
func (*JSON) AppendStringBytes ¶
func (*JSON) DebugPrintNode ¶
func (*JSON) InitResolvable ¶
func (*JSON) MergeArrays ¶
func (*JSON) MergeNodes ¶
func (*JSON) MergeNodesWithPath ¶
func (*JSON) MergeObjects ¶
func (*JSON) NodeIsDefined ¶
func (*JSON) ObjectFieldKey ¶
func (*JSON) ObjectFieldValue ¶
func (*JSON) ParseArray ¶
func (*JSON) ParseObject ¶
func (*JSON) PrintObjectFlat ¶
PrintObjectFlat prints the flat object without nested fields (array, object)
type Node ¶
type Node struct { Kind NodeKind ObjectFieldValue int ObjectFields []int ArrayValues []int // contains filtered or unexported fields }
func (*Node) ValueBytes ¶
type NodeKind ¶
type NodeKind int
const ( NodeKindSkip NodeKind = iota NodeKindObject NodeKindObjectField NodeKindArray NodeKindString NodeKindNumber NodeKindBoolean NodeKindNull // NodeKindNullSkipError indicates that the node is null, but no error should be emitted // There's no need to emit an error if the field should be non-nullable, // because an error was already emitted when the field was fetched // or a nested error was emitted, so there's no need to emit another one NodeKindNullSkipError )
type PathElement ¶
Click to show internal directories.
Click to hide internal directories.