0

データベースからデータを取得して 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!\"}]"
  1. 実際のヘッダーを表示する必要がありますか?
  2. 二重引用符がそのようにエスケープされるのは正常ですか?
  3. 全体をファイルの形式にする必要がありますか? foo.json?
  4. Doctrine エンティティを JSON に適切に変換する方法を知っていますか?
4

1 に答える 1

0

ブラウザ用の json アドオンをダウンロードする必要があります。chrome jsonアドオンを使用しているように https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc?hl=en

于 2013-04-25T12:20:54.873 に答える