JSON Not converting long numbers appropriately

前端 未结 2 1733
太阳男子
太阳男子 2020-12-09 11:47

I have a simple JSON where number is not getting parsed properly.

[
  {
    \"orderNumber\": 1,
    \"customerId\": 228930314431312345,
    \"shoppingCartId\         


        
2条回答
  •  春和景丽
    2020-12-09 12:12

    Javascript represents its numbers as double precision floats which limits the largest integer number that can be represented to +-9007199254740992. Here is the ECMA documentation.

提交回复
热议问题