Home SliceSelector Class
SliceSelector Class
Cancel

SliceSelector Class

Namespace: Json.Path

Inheritance: SliceSelector 🡒 object

Implemented interfaces:

  • ISelector

Represents a slice selector in the form start : end : step.

Properties

NameTypeSummary
Endint?Gets the end.
Startint?Gets the start.
Stepint?Gets the step.

Methods

BuildString(StringBuilder builder)

Builds a string using a string builder.

Declaration

1
public void BuildString(StringBuilder builder)
ParameterTypeDescription
builderStringBuilderThe string builder.

Evaluate(Node match, JsonNode rootNode)

Evaluates the selector.

Declaration

1
public IEnumerable<Node> Evaluate(Node match, JsonNode rootNode)
ParameterTypeDescription
matchNodeThe node to evaluate.
rootNodeJsonNodeThe root node (typically used by filter selectors, e.g. $[?@foo < $.bar])

Returns

A collection of nodes.

Semantically, this is a nodelist, but leaving as IEnumerable<Node> allows for deferred execution.

ToString()

Returns a string that represents the current object.

Declaration

1
public override string ToString()

Returns

A string that represents the current object.

Contents