I am getting a JSON response from a server but the JSON is not in a one format. So obviously there is no point of creating classes to deserialize it. So, I tried to use dynamic
but I am unable to read the response.
The sample JSON String is
" {"hm_xytrict":"HM Tricky District - oop","hmSD":"HM Pool District"}"
Note that "hm_xytrict" and "hmSD" will be different every time
I am using
dynamic jsonResponse = JsonConvert.DeserializeObject(responseString);
For this specific case I can use jsonResponse.hm_xytrict
and jsonResponse.hmSD
but since they are also dynamic so how can I read jsonResponse
for all cases.
Thank you, Hamza