warning : json_decode(): option JSON_BIGINT_AS_STRING not implemented in xxx

先来一段json_decode官方说明

mixed json_decode ( string $json [, bool $assoc = false [, int $depth = 512 [, int $options = 0 ]]] )

由于在处理订单中需要使用到比较大的整形,而第三方回传的json中,订单大小超过了本机可处理的最大长度,所以使用到了json_decode的 $options  参数

关于 $options 的取值,参见 json_constants [http://php.net/manual/en/json.constants.php]

那么,问题来了,按照说明使用的时候,出现了如题所示的错误

请教度娘,参考文献 http://stackoverflow.com/questions/19520487/json-bigint-as-string-removed-in-php-5-5 和 http://stackoverflow.com/questions/28109419/json-decode-decodes-large-numeric-string-as-integer

得出结论,没有安装json扩展或是安装的json扩展太旧,没有对应的函数

下载 jsonc 扩展,进行安装,安装完成以后,再运行就好了。

posted @ 2015-09-07 11:57  Debm.Zhang  阅读(472)  评论(0编辑  收藏  举报