-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
I would like to have an option for these two to equal:
using DeepEqual;
using DeepEqual.Syntax;
using DeepEqual.SystemTextJson;
using System.Text.Json;
var object1 = JsonDocument.Parse("""{"Object":{"Property":1}}""");
var object2 = JsonDocument.Parse("""{"object":{"property":1}}""");
var comparison = new ComparisonBuilder()
.UseSystemTextJson()
.Create();
bool result = object1.IsDeepEqual(object2, comparison);
object1.ShouldDeepEqual(object2, comparison);It would likely need to be implemented here:
DeepEqual/src/DeepEqual.System.Text.Json/JsonElementComparison.cs
Lines 64 to 65 in 78f91a4
| var properties1 = leftValue.EnumerateObject().ToDictionary(x => x.Name); | |
| var properties2 = rightValue.EnumerateObject().ToDictionary(x => x.Name); |
Metadata
Metadata
Assignees
Labels
No labels