I have to de-serialize any given JSON String to C# Object. The JSON String is dynamic. So i cannot define Class structure for that Object. I want some dynamic approach where C# should handle internally.
I have already tried using
dynamic myObject = JsonConvert.DeserializeObject<dynamic>(Json);
Above gives me some meta data counts and complex structure which was not helpful. I just need only object. Also i have used
object result = new JavaScriptSerializer().DeserializeObject(Json);
above does not handle the Array type. sample JSON's
json1:[{"associatedToId":null,"associationType":null,"isObsolete":null}]
json2:{"commercialName":"[\"\",\"\"]","commercialActivity":"[\"\",\"\"]"}
json3:["شر*************************","Gu******************************"]
I need code to deserialize it to an object. which i will be using further for recursion and correcting data.