刪除特定的屬性我有JSON
串如下如何從JSON字符串使用C#
[{
"attachments": [{ "comment": "communication", "comment_date_time": "2035826"} ],
"spent_hours": "4.00",
"description": ""
},
{
"attachments": [],
"spent_hours": "4.00",
"description": ""
}]
我怎樣才能把用C#的JSON
字符串attachments
屬性。我正在使用JSON.net。
嘗試使用Newtonsoft.JSON轉換JSON到.NET對象,然後你可以很容易地 –
刪除它試試這個=> HTTP: //james.newtonking.com/pages/json-net.aspx –
我認爲你可以像http://stackoverflow.com/a/32153051中所描述的那樣做 –