Skip to main content

Class: JSONPathNode

jsonpath.JSONPathNode

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

Constructors

constructor

new JSONPathNode(value, location, root): JSONPathNode

Parameters

NameTypeDescription
valueJSONValueThe JSON value found at location.
location(string | number)[]The parts of a normalized path to value.
rootJSONValueThe 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 path(): string

Returns

string

Defined in

src/path/node.ts:20

Methods

decode_name_location

decode_name_location(name): string

Parameters

NameType
namestring

Returns

string

Defined in

src/path/node.ts:40


toPointer

toPointer(): JSONPointer

Return this node's location as a JSONPointer.

Returns

JSONPointer

Defined in

src/path/node.ts:33