我在角項目中使用.NET WCF服務,但我得到這樣的迴應:如何從json數據中刪除
{
"stateResult": "[{\"state_id\":\"1\",\"state_name\":\"Madhya Pradesh\",\"IsActive\":\"True\"},{\"state_id\":\"2\",\"state_name\":\"Gujrat\",\"IsActive\":\"True\"},{\"state_id\":\"3\",\"state_name\":\"Goa\",\"IsActive\":\"True\"},{\"state_id\":\"4\",\"state_name\":\"Maharashtra\",\"IsActive\":\"True\"}]"
}
,但期望的結果;
[{"state_id":"1","state_name":"Madhya Pradesh","IsActive":"True"},{"state_id":"2","state_name":"Gujrat","IsActive":"True"},{"state_id":"3","state_name":"Goa","IsActive":"True"},{"state_id":"4","state_name":"Maharashtra","IsActive":"True"}]
您應該修改.NET WCF服務 – Satpal
你應該只解決什麼正在生成該響應。 –
你是如何創建這個JSON的?你錯了。刪除斜線只是隱藏了問題。 – Amy