Table of Contents

Class JsonNodeExtensions

Namespace
Songhay.Publications.Extensions
Assembly
Songhay.Publications.dll

Extensions of JsonNode

public static class JsonNodeExtensions
Inheritance
JsonNodeExtensions
Inherited Members

Methods

CopyNode(JsonNode?)

Copies the specified JsonNode by calling ToJsonString(JsonSerializerOptions)

public static JsonNode? CopyNode(this JsonNode? node)

Parameters

node JsonNode

The node.

Returns

JsonNode

Remarks

This method is not efficient. For details, see https://stackoverflow.com/a/71000222/22944.

HasProperty(JsonNode?, string?)

Returns false when the specified property name does not exist.

public static bool HasProperty(this JsonNode? node, string? propertyName)

Parameters

node JsonNode

the JsonNode

propertyName string

the property name

Returns

bool

ToJsonNode(object?)

Converts the specified object to a JsonNode.

public static JsonNode? ToJsonNode(this object? data)

Parameters

data object

any object

Returns

JsonNode