Class JsonNodeExtensions
- Namespace
- Songhay.Extensions
- Assembly
- SonghayCore.dll
Extensions of JsonNode.
public static class JsonNodeExtensions
- Inheritance
-
JsonNodeExtensions
- Inherited Members
Methods
GetJsonValueKind(JsonNode?)
Gets the JsonValueKind of the specified JsonNode.
public static JsonValueKind GetJsonValueKind(this JsonNode? node)
Parameters
node
JsonNodeThe node.
Returns
Remarks
This member is needed for .NET 6.0 and earlier.
GetPropertyValue<T>(JsonNode?, string)
Gets the property value of the specified JsonNode.
public static (T? value, bool success) GetPropertyValue<T>(this JsonNode? node, string propertyName)
Parameters
Returns
Type Parameters
T
IsExpectedObject(JsonNode?, ILogger?, params string[])
Determines whether the specified JsonNode is the expected JsonObject.
public static bool IsExpectedObject(this JsonNode? node, ILogger? logger, params string[] properties)
Parameters
Returns
ToJsonArray(JsonNode?, ILogger?)
public static JsonArray? ToJsonArray(this JsonNode? node, ILogger? logger)
Parameters
Returns
ToJsonObject(JsonNode?, ILogger?)
Converts to the specified JsonNode
to JsonObject or logs failure and returns null
.
public static JsonObject? ToJsonObject(this JsonNode? node, ILogger? logger)