我正在尝试从我的数据库中获取数据并将其转换为JSON(Symfony2) 以下是我访问json页面时收到的回复:
HTTP/1.0 200 OK Cache-Control: no-cache Content-Type: application/json Date: Mon, 11 Feb 2013 15:05:03 GMT "[{\"id\":1,\"iam\":1,\"youare\":2,\"lat\":50.8275853,\"lng\":4.3809764,\"msgbody\":\"I saw you over there what's up!\"},{\"id\":2,\"iam\":1,\"youare\":2,\"lat\":50.8275853,\"lng\":4.3809764,\"msgbody\":\"I saw you over there what's up!\"},{\"id\":3,\"iam\":1,\"youare\":2,\"lat\":50.8275853,\"lng\":4.3809764,\"msgbody\":\"I saw you over there what's up!\"},{\"id\":4,\"iam\":1,\"youare\":2,\"lat\":50.8275853,\"lng\":4.3809764,\"msgbody\":\"I saw you over there what's up!\"},{\"id\":5,\"iam\":1,\"youare\":2,\"lat\":50.8275853,\"lng\":4.3809764,\"msgbody\":\"I saw you over there what's up!\"},{\"id\":6,\"iam\":1,\"youare\":2,\"lat\":50.8275853,\"lng\":4.3809764,\"msgbody\":\"I saw you over there what's up!\"}]"
答案 0 :(得分:2)
您可以查看此链接: http://jsonviewer.stack.hu/ 它会让你清楚地知道你哪里出错了。
答案 1 :(得分:0)
您必须为浏览器下载json附加组件。 喜欢我使用chrome json附加组件 https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc?hl=en