问题
I have problem with Newtonsoft.JsonConverter in my C# app. I have decimal with trailing zeros. After convert to json - there zeros are missing.
Example:
input (decimal): 1.99000
output (json): 1.99
I have my own converter, that handles decimal value. Also, I configured FloatParseHandling as decimal.
What can I do to preserve this process?
回答1:
This was a bug introduced in Json.NET 10.0.1 and reported here. It has since been fixed in 11.0.1.
来源:https://stackoverflow.com/questions/46684557/preserve-remove-trailing-zeros-in-newtonsoft-json