Namespace: Json.Path
Inheritance: PathSegment 🡒 object
Implemented interfaces:
- IEquatable<PathSegment>
Represents a single path segment, generally indicated in the path by square brackets [].
Properties
| Name | Type | Summary |
|---|---|---|
| IsRecursive | bool | Indicates whether the segment is evaluated as a recursive descent operation. |
| IsShorthand | bool | Indicates whether the segment is represented in its shorthand form (e.g. .foo instead of ['foo']). |
| Selectors | ISelector[] | Gets the collection of selectors present in the path. |
Methods
BuildString(StringBuilder builder)
Builds a string representation using a System.Text.StringBuilder.
Declaration
1
public void BuildString(StringBuilder builder)
| Parameter | Type | Description |
|---|---|---|
| builder | StringBuilder | A string builder. |
Equals(PathSegment other)
Indicates whether the current Json.Path.PathSegment is equal to another Json.Path.PathSegment.
Declaration
1
public bool Equals(PathSegment other)
| Parameter | Type | Description |
|---|---|---|
| other | PathSegment | A Json.Path.PathSegment to compare with this instance. |
Returns
if the current instance is equal to
Remarks
Shorthand syntax (Json.Path.PathSegment.IsShorthand) is ignored when comparing segments, so e.g. .foo and ['foo'] are considered equal.
Equals(object obj)
Determines whether the specified object is equal to the current object.
Declaration
1
public override bool Equals(object obj)
| Parameter | Type | Description |
|---|---|---|
| obj | object | The object to compare with the current object. |
Returns
if the specified object is equal to the current object; otherwise,
GetHashCode()
Serves as the default hash function.
Declaration
1
public override int GetHashCode()
Returns
A hash code for the current object.
ToString()
Returns a string that represents the current object.
Declaration
1
public override string ToString()
Returns
A string that represents the current object.