0
我從微軟圖形API獲取組信息的JSON對象,並將其返回結果爲:微軟圖形API的結果不被視爲在AngularJS
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups(id,displayName,description)",
"value": [
{
"id": "00000000-0000-0000-0000-000000000000",
"description": "Admin",
"displayName": "Admin"
},
{
"id": "00000000-0000-0000-0000-000000000000",
"description": "End user",
"displayName": "EndUser"
},
{
"id": "00000000-0000-0000-0000-000000000000",
"description": "Administrator",
"displayName": "Administrator"
},
{
"id": "00000000-0000-0000-0000-000000000000",
"description": "XXX",
"displayName": "XXX"
}
]
}
我從服務器返回此字符串:
return req.CreateResponse(HttpStatusCode.OK, groups);
在客戶端的AngularJS 1.6中,它被視爲字符串而不是JSON對象。有誰知道什麼可能是錯的?