Class: JSONPathNode
Defined in: src/path/node.ts:13
The pair of a JSON value and its location found in the target JSON value.
Constructors
new JSONPathNode()
new JSONPathNode(
value,location,root):JSONPathNode
Defined in: src/path/node.ts:19
Parameters
value
The JSON value found at location.
location
(string | number)[]
The parts of a normalized path to value.
root
The target value at the top of the JSON node tree.
Returns
Properties
location
readonlylocation: (string|number)[]
Defined in: src/path/node.ts:21
The parts of a normalized path to value.
root
readonlyroot:JSONValue
Defined in: src/path/node.ts:22
The target value at the top of the JSON node tree.
value
readonlyvalue:JSONValue
Defined in: src/path/node.ts:20
The JSON value found at location.
Accessors
path
Get Signature
get path():
string
Defined in: src/path/node.ts:28
Deprecated
Use getPath with options.form set to canonical instead.
Returns
string
Methods
getPath()
getPath(
options?):string
Defined in: src/path/node.ts:39
Get the path to this node in the target JSON value.
Given that the path refers to the singular current node, the returned path
will always be a normalized path if options.form is set to canonical,
following section 2.7 of RFC 9535.
Parameters
options?
Returns
string
toPointer()
toPointer():
JSONPointer
Defined in: src/path/node.ts:54
Return this node's location as a JSONPointer.