Skip to main content

Class: JSONPathNode

The pair of a JSON value and its location found in the target JSON value.

Constructors

new JSONPathNode()

new JSONPathNode(value, location, root): JSONPathNode

Parameters

value

JSONValue

The JSON value found at location.

location

(string | number)[]

The parts of a normalized path to value.

root

JSONValue

The target value at the top of the JSON node tree.

Returns

JSONPathNode

Defined in

src/path/node.ts:14

Properties

location

readonly location: (string | number)[]

The parts of a normalized path to value.

Defined in

src/path/node.ts:16


root

readonly root: JSONValue

The target value at the top of the JSON node tree.

Defined in

src/path/node.ts:17


value

readonly value: JSONValue

The JSON value found at location.

Defined in

src/path/node.ts:15

Accessors

path

Get Signature

get path(): string

Returns

string

Defined in

src/path/node.ts:20

Methods

toPointer()

toPointer(): JSONPointer

Return this node's location as a JSONPointer.

Returns

JSONPointer

Defined in

src/path/node.ts:33