Update tests to reflect the different rounding/e-notation when writing numbers between S.T.J and Newtonsoft.Json #32350
Labels
area-System.Text.Json
help wanted
[up-for-grabs] Good issue for external contributors
test-enhancement
Improvements of test source code
Milestone
Add string comparison asserts for writer tests with various floats/doubles with accurate expected strings. Comparing to the strings from
Newtonsoft.Json
won't work for all cases, and we should split up those special cases into their own tests with hard-coded strings.Writing trailing zeros for float/double/decimal number differ. For example:
"message": -1588732675085190
vs."message": -1588732675085190.0
runtime/src/libraries/System.Text.Json/tests/Utf8JsonWriterTests.cs
Lines 5557 to 5558 in dda29ff
The text was updated successfully, but these errors were encountered: