【发布时间】:2015-04-21 09:38:52
【问题描述】:
你能告诉我解析任何 JSON 输出有什么问题吗?
我正在使用此代码 $stats = json_decode($json, true);
if ($stats == null && json_last_error() != JSON_ERROR_NONE) {
throw new \LogicException(sprintf("Failed to parse json string '%s', error: '%s'", $json , json_last_error_msg()));
}
谢谢
【问题讨论】:
-
如果您在jsonlint.com 的第一个链接中验证您的 JSON,您会看到错误