Closed Manny651 closed 1 year ago
This is expected behaviour that's been that way ever since the first version. It's a difference between JSON's unified number type and the fact that C# differentiates all those different types.
If we didn't do that then the interactions could be brittle if one side uses integers and the other floating point values. For example, you may start getting truncated values deserialised to integers when the provider sends decimals.
You need to ensure that any floating point numbers contain a fractional element so that it can be ensured both sides are using floating point.
When a match condition is a decimal number with an integer value, there is a verification mismatch when the JSON value is represented by a integer.
Example:
Gives Verification mismatches:
It looks like the library expects the decimals to be serialized by Json.NET (which always serializes floats and decimals with a decimal point), unlike System.Text.Json or other frameworks.