JsonProxyNodeExtensions
Namespace: SnowBank.Data.Json · class
Extension methods for working with IJsonProxyNode
Methods
ComputePath
static JsonPath ComputePath(IJsonProxyNode parent, in JsonPathSegment segment)
Returns the path to the given node, from the root
static JsonPath ComputePath(IJsonProxyNode parent, in JsonPathSegment segment, JsonPathSegment child)
Returns the path to a child of this node, from the root
static JsonPath ComputePath(IJsonProxyNode parent, in JsonPathSegment segment, ReadOnlyMemory<char> name)
Returns the path to a field of this object, from the root
parent— Parent of this node (ornullif this is the top level)segment— Name or index of this node in its parentname— Name of a field in this object
static JsonPath ComputePath(IJsonProxyNode parent, in JsonPathSegment segment, Index index)
Returns the path to an item of this array, from the root
parent— Parent of this node (ornullif this is the top level)segment— Name or index of this node in its parentindex— Index of the item in this array
GetPathSegments
static JsonPathSegment[] GetPathSegments(IJsonProxyNode node, JsonPathSegment child = null)
Computes the path segments to a node, including an optional child.
TryGetPathSegments
static bool TryGetPathSegments(IJsonProxyNode node, JsonPathSegment child, Span<JsonPathSegment> buffer, out int written)
Computes the path segments to a child of a node.