Home RelativeJsonPointer Struct
RelativeJsonPointer Struct
Cancel

RelativeJsonPointer Struct

Namespace: Json.Pointer

Inheritance: RelativeJsonPointer 🡒 ValueType 🡒 object

Implemented interfaces:

  • IEquatable<RelativeJsonPointer>

Represents a Relative JSON Pointer IAW draft-handrews-relative-json-pointer-02

Fields

NameTypeSummary
NullRelativeJsonPointerThe null pointer. Indicates no navigation should occur.

Properties

NameTypeSummary
ArrayIndexManipulatorintGets the number of lateral steps to take. Applicable only for arrays.
IsIndexQueryboolGets whether the pointer is an index query, which returns the index within the parent rather than the value.
ParentStepsuintGets the number of parent (root) steps to take.
PointerJsonPointerGets the pointer to follow after taking Json.Pointer.RelativeJsonPointer.ParentSteps steps upward.

Constructors

RelativeJsonPointer()

Creates the null pointer.

Declaration

1
public RelativeJsonPointer()

Methods

Equals(RelativeJsonPointer other)

Indicates whether the current object is equal to another object of the same type.

Declaration

1
public bool Equals(RelativeJsonPointer other)
ParameterTypeDescription
otherRelativeJsonPointerAn object to compare with this object.

Returns

if the current object is equal to the parameter; otherwise, .

Equals(object obj)

Indicates whether this instance and a specified object are equal.

Declaration

1
public override bool Equals(object obj)
ParameterTypeDescription
objobjectThe object to compare with the current instance.

Returns

if and this instance are the same type and represent the same value; otherwise, .

FromPointer(uint parentSteps, JsonPointer pointer)

Creates a Relative JSON Pointer from a JSON Pointer and a number of parent steps.

Declaration

1
public static RelativeJsonPointer FromPointer(uint parentSteps, JsonPointer pointer)
ParameterTypeDescription
parentStepsuintThe number of parent steps.
pointerJsonPointerThe JSON Pointer.

Returns

A Relative JSON Pointer.

FromPointer(uint parentSteps, int arrayIndexManipulator, JsonPointer pointer)

Creates a Relative JSON Pointer from a JSON Pointer and a number of parent steps.

Declaration

1
public static RelativeJsonPointer FromPointer(uint parentSteps, int arrayIndexManipulator, JsonPointer pointer)
ParameterTypeDescription
parentStepsuintThe number of parent steps.
arrayIndexManipulatorintThe index manipulator.
pointerJsonPointerThe JSON Pointer.

Returns

A Relative JSON Pointer.

GetHashCode()

Returns the hash code for this instance.

Declaration

1
public override int GetHashCode()

Returns

A 32-bit signed integer that is the hash code for this instance.

IndexQuery(uint parentSteps)

Creates an index query pointer.

Declaration

1
public static RelativeJsonPointer IndexQuery(uint parentSteps)
ParameterTypeDescription
parentStepsuint 

Returns

A Relative JSON Pointer.

IndexQuery(uint parentSteps, int arrayIndexManipulator)

Creates an index query pointer.

Declaration

1
public static RelativeJsonPointer IndexQuery(uint parentSteps, int arrayIndexManipulator)
ParameterTypeDescription
parentStepsuint 
arrayIndexManipulatorintThe index manipulator.

Returns

A Relative JSON Pointer.

Parse(string source)

Parses a JSON Pointer segment from a string.

Declaration

1
public static RelativeJsonPointer Parse(string source)
ParameterTypeDescription
sourcestringThe source string.

Returns

A Relative JSON Pointer.

ToString()

Returns the fully qualified type name of this instance.

Declaration

1
public override string ToString()

Returns

The fully qualified type name.

TryEvaluate(JsonNode node, out JsonNode result)

Evaluates the relative pointerOld over a System.Text.Json.Nodes.JsonNode.

Declaration

1
public bool TryEvaluate(JsonNode node, out JsonNode result)
ParameterTypeDescription
nodeJsonNodeThe System.Text.Json.Nodes.JsonNode.
resultout JsonNodeThe result, if return value is true; null otherwise

Returns

true if a value exists at the indicate path; false otherwise.

TryParse(string source, out RelativeJsonPointer relativePointer)

Parses a JSON PointerOld from a string.

Declaration

1
public static bool TryParse(string source, out RelativeJsonPointer relativePointer)
ParameterTypeDescription
sourcestringThe source string.
relativePointerout RelativeJsonPointerThe resulting relative pointerOld.

Returns

true if the parse was successful; false otherwise.

Contents