Class JsonLocationNode
Represents a node of a JsonLocation.
Inheritance
Inherited Members
Namespace: JsonCons.JsonPath
Assembly: JsonCons.JsonPath.dll
Syntax
public sealed class JsonLocationNode
Constructors
| Improve this Doc View SourceJsonLocationNode(JsonLocationNode, Int32)
Constructs a path node from a parent and an index
Declaration
public JsonLocationNode(JsonLocationNode parent, int index)
Parameters
Type | Name | Description |
---|---|---|
JsonLocationNode | parent | The parent. |
System.Int32 | index | The index. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
JsonLocationNode(JsonLocationNode, String)
Constructs a path node from a parent and name
Declaration
public JsonLocationNode(JsonLocationNode parent, string name)
Parameters
Type | Name | Description |
---|---|---|
JsonLocationNode | parent | The parent. |
System.String | name | The name. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
Properties
| Improve this Doc View SourceComponentKind
Gets the type of this path node.
Declaration
public JsonLocationNodeKind ComponentKind { get; }
Property Value
Type | Description |
---|---|
JsonLocationNodeKind |
Current
Gets an instance of JsonLocationNode that represents the current node (@)
Declaration
public static JsonLocationNode Current { get; }
Property Value
Type | Description |
---|---|
JsonLocationNode |
Parent
Gets the parent of this path node.
Declaration
public JsonLocationNode Parent { get; }
Property Value
Type | Description |
---|---|
JsonLocationNode |
Root
Gets an instance of JsonLocationNode that represents the root value ($)
Declaration
public static JsonLocationNode Root { get; }
Property Value
Type | Description |
---|---|
JsonLocationNode |
Methods
| Improve this Doc View SourceCompareTo(JsonLocationNode)
Compares this instance with a specified JsonLocationNode object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified JsonLocationNode.
Declaration
public int CompareTo(JsonLocationNode other)
Parameters
Type | Name | Description |
---|---|---|
JsonLocationNode | other |
Returns
Type | Description |
---|---|
System.Int32 |
GetHashCode()
Returns the hash code for this JsonLocationNode.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A 32-bit signed integer hash code. |
Overrides
GetIndex()
Gets the value of this JsonLocationNode as an index.
Declaration
public int GetIndex()
Returns
Type | Description |
---|---|
System.Int32 |
GetName()
Gets the value of this JsonLocationNode as a name.
Declaration
public string GetName()
Returns
Type | Description |
---|---|
System.String |