Home LengthFunction Class
LengthFunction Class
Cancel

LengthFunction Class

Namespace: Json.Path

Inheritance: LengthFunction 🡒 ValueFunctionDefinition 🡒 object

Implemented interfaces:

  • IReflectiveFunctionDefinition
  • IPathFunctionDefinition

Implements the length() function to get:

  • the length of a string
  • the count of values in an array
  • the count of values in an object

Properties

NameTypeSummary
NamestringGets the function name.

Methods

Evaluate(JsonNode value)

Evaluates the function.

Declaration

1
public JsonNode Evaluate(JsonNode value)
ParameterTypeDescription
valueJsonNodeAn object, array, or string

Returns

If an object or array, the number of items it contains; if a string, the length.

Contents