JsonConvert

using Newtonsoft.Json.Linq;


[TestMethod]
public void SearchHousingTest()
{
    String jsonString = RestUtil.SearchHousing(1, 50);            
    var jObject = Newtonsoft.Json.Linq.JObject.Parse(jsonString);
    JArray itemList = (JArray)jObject["result"]["itemlist"];
    foreach (JObject item in itemList)
    {
        HousingData searchData = item.ToObject<HousingData>();
    }            
}
  • No labels