duanji1043 2013-03-03 17:39
浏览 14
已采纳

无法解析具有巨大价值的JSON

In my JSON I have 4 root values. 3 of them are parsed just good. The 4th dict is not even in the result. In this dict there is a UTF-8 string with key "base64" which length is 50915 symbols.

This happens only on the server (PHP 5.3.*), on my local (PHP 5.4.4) all works fine. What the hell is going on? Is there a limit on one object size?

Code

$json   = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
$result = $json->decode($var);
  • 写回答

1条回答 默认 最新

  • dps123456789 2013-03-03 17:59
    关注

    I think you should use json_decode instead.

    As far as I know, the PEAR library to handle JSON was build because there were no proper way to handle JSON before PHP 5.1. I think you can leave this library aside and use json_* function instead.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)