iOSDebugDatabase icon indicating copy to clipboard operation
iOSDebugDatabase copied to clipboard

Javascript 不支持Long类型,导致数据精度丢失显示异常。

Open xdh725 opened this issue 3 years ago • 0 comments

数据库中integer存储的是Int64的数字,在传输过程中,Long长度大于17位时会出现精度丢失的问题。

在Chrome浏览器调试时也发现,Preview与Response因为精度丢失的原因,显示的数据不一致。

比如 365942491263795226 会显示成 365942491263795200 。

一种方案是将Long类型的整形转成String传输。 一种方案是前端反序列化时不使用默认的JS解析器。

xdh725 avatar Jan 27 '22 11:01 xdh725