0
{"terms":["text",["video",4823,"videov",378,"vido",168,"videotckupload",156,"virginia",108,"videoconferenc",90,"videovv",90,"viewer",66,"videosit",54,"videosort",54]]}

How to design a class which would hold the values after deserialization? I am using JavaScriptSerializer

Gopi
  • 5,656
  • 22
  • 80
  • 146
  • possible duplicate of [C# automatic property deserialization of JSON](http://stackoverflow.com/questions/945585/c-automatic-property-deserialization-of-json) – Shimmy Weitzhandler Dec 22 '10 at 06:45

1 Answers1

1

Something like:

class A
{
     public object[] terms {get; set; }
}
Shurdoof
  • 1,719
  • 13
  • 16
  • But how do i get the values video,4823,videov.. ? – Gopi Dec 22 '10 at 06:54
  • The structure of the json is a bit problematic, as it has multiple types in an array, like string and array, string and number. If the json will always be in this structure you can use "deserializedVar.terms[1]" to get the inner array. – Shurdoof Dec 22 '10 at 06:59
  • Yes thats the problem over here, multiple types in an array. Ok! Will iterate through each object and will get the values Thanks! :) – Gopi Dec 22 '10 at 07:03