Parsing a complex JSON result with C#

后端 未结 4 1447
一生所求
一生所求 2021-01-21 08:46

I am trying to parse the following complex JSON result, which is returned from the Zoho Crm API:

{
\"response\":
{
    \"result\":
    {
        \"Contacts\":
           


        
4条回答
  •  北荒
    北荒 (楼主)
    2021-01-21 09:38

    you can use this code:
    
        dynamic dictionary = (JsonConvert.DeserializeObject>(jsonstring))["response"];
    
    
                var result = dictionary.result;
                var contact= result.Contacts;
                var row= contact.row;
    
                foreach (var item in row)
                {
    
                    var no= item.no;
    
                }
    

提交回复
热议问题