解析以下JSON字符串时,x坐标的浮点值正在更改。
{"spatialReference":{"wkid":4326},"候选人":[{"地址":"240000001","位置":{"x":-79.939219121531494,"y":40.8522153506889806},"分数":100,"属性":{}}]}
在调用JObject.Parse之前的xml时,它被转换为
{"spatialReference":{"wkid":4326},"候选人":[{"地址":"240000001","位置":{"x":-79.9392191215315,"y":40.8522153506889806},"分数":100,"属性":{}}]}
有没有一种方法可以强制解析器将x/y值视为字符串并保持更高的精度?
如果反序列化为x和y属性为小数的强类型对象,则不会丢失任何精度。