VOOZH about

URL: https://docs.json-everything.net/api/JsonPointer.Net/JsonPointer/

⇱ JsonPointer Struct | json-everything


👁 avatar
json-everything
Library documentation
Home JsonPointer Struct
JsonPointer Struct
Cancel

JsonPointer Struct

Namespace: Json.Pointer

Inheritance: JsonPointer 🡒 ValueType 🡒 object

Implemented interfaces:

  • IEquatable<JsonPointer>

Represents a JSON Pointer as defined in RFC 6901. This implementation is optimized for minimal allocations.

Fields

NameTypeSummary
EmptyJsonPointerRepresents an empty JSON Pointer.

Properties

NameTypeSummary
ItemJsonPointerSegmentGets a segment from the pointer by index.
SegmentCountintGets the number of segments in the pointer.

Methods

Combine(JsonPointer other)

Combines this pointer with another pointer.

Declaration

1
public JsonPointer Combine(JsonPointer other)
ParameterTypeDescription
otherJsonPointerThe pointer to append

Returns

A new pointer representing the combination

Combine(params SegmentValueStandIn[] segments)

Combines this pointer with additional segments.

Declaration

1
public JsonPointer Combine(params SegmentValueStandIn[] segments)
ParameterTypeDescription
segmentsparams SegmentValueStandIn[]The segments to append

Returns

A new pointer representing the combination

Remarks

This method incurs allocation costs for string concatenation and array creation. For better performance with large numbers of segments, consider using Json.Pointer.JsonPointer.Parse(System.ReadOnlySpan{System.Char}).

Create(params SegmentValueStandIn[] segments)

Creates a new JSON Pointer from segments.

Declaration

1
public static JsonPointer Create(params SegmentValueStandIn[] segments)
ParameterTypeDescription
segmentsparams SegmentValueStandIn[]The segments to combine.

Returns

A new JSON Pointer.

Remarks

This method incurs allocation costs for string concatenation and array creation. For better performance with large pointers, consider using Json.Pointer.JsonPointer.Parse(System.ReadOnlySpan{System.Char}).

EndsWith(JsonPointer other)

Determines whether the current JSON pointer ends with the specified JSON pointer.

Declaration

1
public bool EndsWith(JsonPointer other)
ParameterTypeDescription
otherJsonPointerThe JSON pointer to compare with the end of the current pointer. Cannot be null.

Returns

true if the current JSON pointer ends with the specified pointer; otherwise, false.

Equals(JsonPointer other)

Compares this pointer with another pointer for equality.

Declaration

1
public bool Equals(JsonPointer other)

Returns

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

Contents

A new version of content is available.