Home PointerSegment Class
PointerSegment Class
Cancel

PointerSegment Class

Namespace: Json.Pointer

Inheritance: PointerSegment 🡒 object

Implemented interfaces:

  • IEquatable<PointerSegment>

Represents a single segment of a JSON Pointer.

Properties

NameTypeSummary
ValuestringGets the segment value.

Methods

Create(string value)

Creates a new Json.Pointer.PointerSegment.

Declaration

1
public static PointerSegment Create(string value)
ParameterTypeDescription
valuestringThe value.

Returns

Equals(PointerSegment other)

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

Declaration

1
public bool Equals(PointerSegment other)
ParameterTypeDescription
otherPointerSegmentAn object to compare with this object.

Returns

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

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

true ifobj and this instance are the same type and represent the same value; otherwise, false.

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.

Parse(string source)

Parses a JSON Pointer segment from a string.

Declaration

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

Returns

A JSON Pointer segment.

ToString(JsonPointerStyle pointerStyle)

Returns the string representation of this instance.

Declaration

1
public string ToString(JsonPointerStyle pointerStyle)
ParameterTypeDescription
pointerStyleJsonPointerStyleIndicates whether to URL-encode the pointer.

Returns

The string representation.

TryParse(string source, out PointerSegment segment)

Parses a JSON Pointer segment from a string.

Declaration

1
public static bool TryParse(string source, out PointerSegment segment)
ParameterTypeDescription
sourcestringThe source string.
segmentout PointerSegmentThe resulting segments.

Returns

true if the parse was successful; false otherwise.

Contents