title: Deserializing multiple JSON result with JavaScriptSerializer
body: <p>I'm trying to deserialize sample JSON at the end of this question with below. But results.count is always 0.
  how can i deserialize this JSON with multiple data so i can loop with</p>
  
  <pre><code>foreach (Foo r in results)
  {
     Response.Write(r.html);
  }
  
  [Serializable()]
  public class Foo
  {
  public string html { get; set; }
  public string bannerid { get; set; }
  public string contenttype { get; set; }
  public string alt { get; set; }
  public string width { get; set; }
  public string height { get; set; }
  public string url { get; set; }
  public string bannertext { get; set; }
  public string bannerurl { get; set; }
  public string campaignid { get; set; }
  public string version { get; set; }
  public string cpc { get; set; }
  }
  
  public List&lt;Foo&gt; GetFooMultiple(string publisherOrSiteId)
  {
          JavaScriptSerializer ser = new JavaScriptSerializer();
          List&lt;Foo&gt; results = ser.Deserialize&lt;List&lt;Foo&gt;&gt;(json);
          return results;        
  }
  
  List&lt;Foo&gt; results = GetFooMultiple("11111,22222");
  Response.Write(results.Count);
  </code></pre>
  
  <p>Json string:</p>
  
  <pre><code>"{ "11111" : { "alt" : "none",
    "bannerid" : "21655",
    "bannertext" : "Sample 1",
    "bannerurl" : "http://foo.com/foo.png",
    "campaignid" : "1216",
    "contenttype" : "png",
    "cpc" : "0.00060",
    "height" : 50,
    "html" : "&lt;a href='http://foo.com/foo.png'&gt;&lt;img src='http://foo.com/foo.png' width='320' height='50' alt='foo' /&gt;&lt;/a&gt;",
    "url" : "http://foo.com/foo.png",
    "version" : "1",
    "width" : 320
  },
    "22222" : { "alt" : "",
    "bannerid" : "21937",
    "bannertext" : "Sample 2",
    "bannerurl" : "",
    "campaignid" : "1241",
    "contenttype" : "txt",
    "cpc" : "0.00060",
    "height" : 0,
    "html" : "&lt;a href='http://foo.com/foo.pngD'&gt;Sample 2&lt;/a&gt;",
    "url" : "http://foo.com/foo.png",
    "version" : "1",
    "width" : 0
  }
  }"
  </code></pre>
  
  <p>The JSON as a C# string, for MVCE:</p>
  
  <pre><code>    string json = @"{ ""11111"" : {
          ""alt"" : ""none"",
    ""bannerid"" : ""21655"",
    ""bannertext"" : ""Sample 1"",
    ""bannerurl"" : ""http://foo.com/foo.png"",
    ""campaignid"" : ""1216"",
    ""contenttype"" : ""png"",
    ""cpc"" : ""0.00060"",
    ""height"" : 50,
    ""html"" : ""&lt;a href='http://foo.com/foo.png'&gt;&lt;img src='http://foo.com/foo.png' width='320' height='50' alt='foo' /&gt;&lt;/a&gt;"",
          ""url"" : ""http://foo.com/foo.png"",
          ""version"" : ""1"",
    ""width"" : 320
  },
    ""22222"" : {
          ""alt"" : """",
    ""bannerid"" : ""21937"",
    ""bannertext"" : ""Sample 2"",
    ""bannerurl"" : """",
    ""campaignid"" : ""1241"",
    ""contenttype"" : ""txt"",
    ""cpc"" : ""0.00060"",
    ""height"" : 0,
    ""html"" : ""&lt;a href='http://foo.com/foo.pngD'&gt;Sample 2&lt;/a&gt;"",
    ""url"" : ""http://foo.com/foo.png"",
    ""version"" : ""1"",
    ""width"" : 0
  }
  }";
  </code></pre>