Coldfusion 8 会截断 JSON 字符串中的数字,但 ColdFusion 10 不会
Coldfusion 8 truncates number in JSON string but ColdFusion 10 does not
这个字符串:
{"status":"ok","payload":{"total pages":1,"page":1,"total entities":1,"queryId":"1e93eb52-7421-4706-8eb9-f41f8ce7ff06","entities":[{"Entity ID":694000000269197}]}}
当 运行 在 CF10 中通过 deserializeJson 产生您所期望的结果时,但在 CF8 中 entities[1]['Entity ID']
导致 6.94000000269E+014
.
这是怎么回事,我怎样才能得到它return真实的数字。
我用的是CFLIBhttp://www.cflib.org/udf/jsondecode function instead of CF8s deserializeJSON function assuming it was just parsing the data wrong after reading this post: Coldfusion SerializeJSON and deSerializeJSON is converting a string to number
这个字符串:
{"status":"ok","payload":{"total pages":1,"page":1,"total entities":1,"queryId":"1e93eb52-7421-4706-8eb9-f41f8ce7ff06","entities":[{"Entity ID":694000000269197}]}}
当 运行 在 CF10 中通过 deserializeJson 产生您所期望的结果时,但在 CF8 中 entities[1]['Entity ID']
导致 6.94000000269E+014
.
这是怎么回事,我怎样才能得到它return真实的数字。
我用的是CFLIBhttp://www.cflib.org/udf/jsondecode function instead of CF8s deserializeJSON function assuming it was just parsing the data wrong after reading this post: Coldfusion SerializeJSON and deSerializeJSON is converting a string to number