mongoexport returning scientific (exponential) notation

依然范特西╮ 提交于 2019-12-12 14:44:30

问题


So I was exporting some collections using mongoexport and found cases where large integers such as 9999999999999 were exported as 9.9999999999999e+13

So two questions: Why is this the case, and how can I prevent this?

Thank you.


回答1:


MongoDB treats all number literals as floating point by default, and above a certain threshold (32 bits?) it switches to scientific notation when exporting to JSON.



来源:https://stackoverflow.com/questions/37961380/mongoexport-returning-scientific-exponential-notation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!