title: Deserializing a JSON file with JavaScriptSerializer()
body: <p>the json file's structure which I will deserialize looks like below;</p>
  
  <pre><code>{
      "id" : "1lad07",
      "text" : "test",
      "url" : "http:\/\/twitpic.com\/1lacuz",
      "width" : 220,
      "height" : 84,
      "size" : 8722,
      "type" : "png",
      "timestamp" : "Wed, 05 May 2010 16:11:48 +0000",
      "user" : {
          "id" : 12345,
          "screen_name" : "twitpicuser"
      }
  }
  </code></pre>
  
  <p>I have created a class which has the filed names as properties for JavaScriptSerializer. The code which I will use to Deserialize the json is as follows;</p>
  
  <pre><code>            using (var reader = new StreamReader(twitpicResponse.GetResponseStream())) {
  
  
                  var responseBody = reader.ReadToEnd();
                  var deserializer = new JavaScriptSerializer();
                  var results = deserializer.Deserialize&lt;Response&gt;(responseBody);
  
              }
  </code></pre>
  
  <p>My problem is how I can read the user field on json file. which is like below;</p>
  
  <pre><code>"user" : {
      "id" : 12345,
      "screen_name" : "twitpicuser"
  }
  </code></pre>
  
  <p>it has sub properties and values. how can I name them on my Response class. my response class now look like this;</p>
  
  <pre><code>public class Response {
  
      public string id { get; set; }
      public string text { get; set; }
      public string url { get; set; }
      public string width { get; set; }
      public string height { get; set; }
      public string size { get; set; }
      public string type { get; set; }
      public string timestamp { get; set; }
  
  }
  </code></pre>
  
  <p>what is the best case to do it?</p>