JsonNode.DeepEquals(JsonNode, JsonNode) Method

Definition

Compares the values of two nodes, including the values of all descendant nodes.

C#
public static bool DeepEquals(System.Text.Json.Nodes.JsonNode? node1, System.Text.Json.Nodes.JsonNode? node2);

Parameters

node1
JsonNode

The JsonNode to compare.

node2
JsonNode

The JsonNode to compare.

Returns

true if the tokens are equal; otherwise false.

Applies to

Product Versions
.NET 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)