fluentassertions.json
fluentassertions.json copied to clipboard
JSON document has a string instead of a date
I'm not sure what exactly happens here, but I am comparing two JSON objects with ISO date formats that look like this:
2021-07-20T06:00:00.000Z
The code looks like this:
response.Should().BeEquivalentTo(JObject.Parse(apiResponseContent));
However, while the dates in response
are kept, it looks like the dates in apiResponseContent
are truncated, and become:
2021-07-20T06:00:00
The test therefore produces an error: JSON document has a string instead of a date at ...
Has anyone encountered this? Is it by design?
I'm about to hit the sheets for today, but if you share a complete minimal runnable example I'll try to give it a look tomorrow.
I just ran into this same issue, when comparing two JObject
s, did you ever find a solution @Ynhockey ?
@evilpilaf can you provide us with a minimal runnable example?