Json.NET Primitive Types - use Decimal instead of Double

前端 未结 1 743
没有蜡笔的小新
没有蜡笔的小新 2020-12-16 17:50

How can I make JSON.NET return a decimal instead of a double when parsing floats from JSON? (it\'s an object with a Dictionary that is seri

相关标签:
1条回答
  • 2020-12-16 18:45

    In Json.NET 5.0, Newtonsoft.Json.JsonSerializerSettings class has the new property FloatParseHandling, you can set this property value Newtonsoft.Json.FloatParseHandling.Decimal

    0 讨论(0)
提交回复
热议问题