API Gateway + Lambda でDynamoDBからデータをGETメソッドで出力しているのですが、データが全て一列に並んでしまい、上手く整形されて出力されません。
ブラウザからアクセスした場合、以下のように表示されます。
JSON
1{"Items":[{"Avatar":{"S":"testavatar"},"Sex":{"N":"1"},"FavoritePlaylist":{"L":[]},"DJName":{"S":"testName"},"Birthdate":{"S":"00/00/0000"},"Email":{"S":"test@test.com"},"ImageBackground":{"S":"testbackground"},"Profile":{"S":"test"},"Password":{"S":"testpass"}},{"Sex":{"N":"1"},"Email":{"S":"test2@test.com"},"DJName":{"S":"DJNametest2"},"Password":{"S":"testpass"}}],"Count":2,"ScannedCount":2}
API Gateway上でテストを実行し、出力した際には以下のように表示されます。
JSON
1{ 2 "Items": [ 3 { 4 "Avatar": { 5 "S": "testavatar" 6 }, 7 "Sex": { 8 "N": "1" 9 }, 10 "FavoritePlaylist": { 11 "L": [] 12 }, 13 "DJName": { 14 "S": "testName" 15 }, 16 "Birthdate": { 17 "S": "00/00/0000" 18 }, 19 "Email": { 20 "S": "test@test.com" 21 }, 22 "ImageBackground": { 23 "S": "testbackground" 24 }, 25 "Profile": { 26 "S": "test" 27 }, 28 "Password": { 29 "S": "testpass" 30 } 31 }, 32 { 33 "Sex": { 34 "N": "1" 35 }, 36 "Email": { 37 "S": "test2@test.com" 38 }, 39 "DJName": { 40 "S": "DJNametest2" 41 }, 42 "Password": { 43 "S": "testpass" 44 } 45 } 46 ], 47 "Count": 2, 48 "ScannedCount": 2 49}
後者の出力の仕方にする場合は、どのような設定を行えばよいのでしょうか?
よろしくお願いします。

回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。