先来一段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 扩展,进行安装,安装完成以后,再运行就好了。

相关文章:

  • 2021-05-18
  • 2021-11-27
  • 2022-12-23
  • 2021-08-27
  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
猜你喜欢
  • 2021-12-13
  • 2022-12-23
  • 2022-12-23
  • 2022-02-27
  • 2021-10-06
  • 2021-09-30
  • 2021-10-16
相关资源
相似解决方案