When comparing hashes of serialized objects on the server and client, it is important for the JSON rendering to be identical on both sides. Currently, there is an issue with a number field being serialized differently in JavaScript and .NET - causing the hashes to not match.
In JavaScript, the number field serializes as "duration": 1
, while in .NET it serializes as "duration": 1.0
. This discrepancy is leading to mismatched hashes.
How can I get .NET to serialize without adding the trailing zero?