0
{"data": {
                "auth_expires": 0,
                "string_original": "keyword",
                "string": "keyword",
                "tld": "com",
                "tlds": [
                        "com",
                        "news"
                ],
                "domains": {
                        "com": [
                                "keyword hq .com",
                                "top keyword .com",
                                "keyword tool .com"
                        ]
                     }
            }
}

This is what i get in json,how to properly convert it in string arrays or lists? This is example of my code.Im trying to get exact part from json,like "com",so in string array i would have "keyword hq .com" amd so other

class JsonResponse
{
  public List<domain> domains { get; set; }
}
class domain 
{
    string com;
}
 JsonResponse response = JsonSerializer.Deserialize<JsonResponse>(jsonResponse);

UPDATE:Made JSON in valid view

Kirill Az
  • 19
  • 4
  • 2
    You've already asked this question, and as before your JSON isn't valid. – Sean Jan 07 '22 at 16:23
  • I answered,thats what i get from api, and this is small part from whole file – Kirill Az Jan 07 '22 at 16:24
  • I ve tried this link already,and tried to make smth similar to it,as u see in my example.I dont understand still – Kirill Az Jan 07 '22 at 16:33
  • You don't deserialize part of json. You deserialize the entire thing. Once you have done that, then you access a specific component you want from the main object. – Jawad Jan 07 '22 at 16:39

0 Answers0