fluentassertions / fluentassertions.json

NewtonSoft.Json extensions for FluentAssertions
Apache License 2.0
72 stars 26 forks source link

How to compare Json with different case in property name? #66

Closed mflay1 closed 2 years ago

mflay1 commented 2 years ago

Hi,

Is it possible to compare properties ignoring casesensivity? Example:

var actual = JToken.Parse(@"{ ""KEY1"" : ""value"" }"); // uppercase property
var expected = JToken.Parse(@"{ ""key1"" : ""value"" }"); // lowercase property
actual.Should().BeEquivalentTo(expected);

I couldn't find any info about this. Also chat is inaccessible for me.