Parse JSON array in JSON.NET

前端 未结 3 822
梦如初夏
梦如初夏 2021-01-24 03:51

I have JSON object in REST API response:

{
    Result:
    [
        {
            \"id\": 1,
            \"id_endpoint\": 1,
            \"name\": \"Endpoint 1\         


        
3条回答
  •  鱼传尺愫
    2021-01-24 04:18

    Please refer to following code:

    var response =  JsonConvert.DeserializeObject>(JSONstring);
    
    if(response != null && response["StatusCode"] == "200")
    {
         List lstResult = JsonConvert.DeserializeObject(response["Result"]);
    }
    

    I hope this would help.

提交回复
热议问题