Class: JSONPathNode
Defined in: src/path/nodes.ts:35
A JSON value and its location within a JSON document.
Constructors
Constructor
new JSONPathNode(
node):JSONPathNode
Defined in: src/path/nodes.ts:41
Parameters
node
InternalNode
Returns
JSONPathNode
Properties
location
readonlylocation: (string|number)[]
Defined in: src/path/nodes.ts:37
value
readonlyvalue:JSONValue
Defined in: src/path/nodes.ts:36
Accessors
pointer
Get Signature
get pointer():
JSONPointer
Defined in: src/path/nodes.ts:98
A JSON Pointer derived from this node's location.
Returns
Methods
addOp()
addOp(
value):OpObject
Defined in: src/path/nodes.ts:115
Return a JSON Pointer add operation with the path set to this node.
Parameters
value
Returns
copyOp()
copyOp(
to):OpObject
Defined in: src/path/nodes.ts:143
Return a JSON Pointer copy operation with from set to this node.
Parameters
to
Returns
moveOp()
moveOp(
to):OpObject
Defined in: src/path/nodes.ts:136
Return a JSON Pointer move operation with from set to this node.
Parameters
to
Returns
normalizedPath()
normalizedPath():
string
Defined in: src/path/nodes.ts:47
Returns
string
parentNode()
parentNode():
JSONPathNode|undefined
Defined in: src/path/nodes.ts:91
Return this node's parent, or undefined if this node is the document root.
Returns
JSONPathNode | undefined
removeOp()
removeOp():
OpObject
Defined in: src/path/nodes.ts:122
Return a JSON Pointer remove operation with the path set to this node.
Returns
replaceOp()
replaceOp(
value):OpObject
Defined in: src/path/nodes.ts:129
Return a JSON Pointer replace operation with the path set to this node.
Parameters
value
Returns
shorthandPath()
shorthandPath():
string
Defined in: src/path/nodes.ts:67
Returns
string
testOp()
testOp(
value):OpObject
Defined in: src/path/nodes.ts:150
Return a JSON Pointer test operation with the path set to this node.
Parameters
value
Returns
toPointer()
toPointer():
JSONPointer
Defined in: src/path/nodes.ts:108
Return this node's location as a JSONPointer.