Skip to main content

Class: NumberLiteral

jsonpath.expressions.NumberLiteral

Base class for JSONPath ValueType literals.

Hierarchy

Constructors

constructor

new NumberLiteral(token, value): NumberLiteral

Parameters

NameType
tokenToken
valuenumber

Returns

NumberLiteral

Overrides

FilterExpressionLiteral.constructor

Defined in

src/path/expression.ts:78

Properties

token

Readonly token: Token

Inherited from

FilterExpressionLiteral.token

Defined in

src/path/expression.ts:79


value

Readonly value: number

Defined in

src/path/expression.ts:80

Methods

evaluate

evaluate(): number

Evaluate the filter expression in the given context.

Returns

number

Overrides

FilterExpressionLiteral.evaluate

Defined in

src/path/expression.ts:85


toString

toString(): string

Return a string representation of the expression.

Returns

string

Overrides

FilterExpressionLiteral.toString

Defined in

src/path/expression.ts:89