<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />

JTokenEqualityComparer

Compares tokens to determine whether they are equal.
using System.Collections.Generic; using System.Runtime.CompilerServices; namespace Newtonsoft.Json.Linq { public class JTokenEqualityComparer : IEqualityComparer<JToken> { [System.Runtime.CompilerServices.NullableContext(2)] public bool Equals(JToken x, JToken y) { return JToken.DeepEquals(x, y); } [System.Runtime.CompilerServices.NullableContext(1)] public int GetHashCode(JToken obj) { return obj?.GetDeepHashCode() ?? 0; } } }