title: JSON Cannot Deserialize JSON array into type
body: <p>I keep having issues trying to get this JSON to deserialize, even after trying multiple approaches.</p>
  
  <p>Here is the JSON that is returned by the web service:</p>
  
  <pre><code>[
     {
        "data":[
           {
              "osis":"Matthew 5:5-8",
              "content":"&lt;p&gt;&lt;span id=\"unique-id-23240\" class=\"text Matt-5-5\"&gt;&lt;span class=\"woj\"&gt;&lt;sup class=\"versenum\"&gt;5\u00a0&lt;\/sup&gt;\u201cBlessed are the &lt;sup class='crossreference' value='(&lt;a href=\"#cunique-id-23240A\" title=\" A\"&gt;A&lt;\/a&gt;)'&gt;(&lt;a href=\"#cunique-id-23240A\" title=\" A\"&gt;A&lt;\/a&gt;)&lt;\/sup&gt;meek, for they &lt;sup class='crossreference' value='(&lt;a href=\"#cunique-id-23240B\" title=\" B\"&gt;B&lt;\/a&gt;)'&gt;(&lt;a href=\"#cunique-id-23240B\" title=\" B\"&gt;B&lt;\/a&gt;)&lt;\/sup&gt;shall inherit the earth.&lt;\/span&gt;&lt;\/span&gt;&lt;\/p&gt; &lt;p&gt;&lt;span id=\"unique-id-23241\" class=\"text Matt-5-6\"&gt;&lt;span class=\"woj\"&gt;&lt;sup class=\"versenum\"&gt;6\u00a0&lt;\/sup&gt;\u201cBlessed are those who hunger and &lt;sup class='crossreference' value='(&lt;a href=\"#cunique-id-23241C\" title=\" C\"&gt;C&lt;\/a&gt;)'&gt;(&lt;a href=\"#cunique-id-23241C\" title=\" C\"&gt;C&lt;\/a&gt;)&lt;\/sup&gt;thirst &lt;sup class='crossreference' value='(&lt;a href=\"#cunique-id-23241D\" title=\" D\"&gt;D&lt;\/a&gt;)'&gt;(&lt;a href=\"#cunique-id-23241D\" title=\" D\"&gt;D&lt;\/a&gt;)&lt;\/sup&gt;for righteousness, for they shall be satisfied.&lt;\/span&gt;&lt;\/span&gt;&lt;\/p&gt; &lt;p&gt;&lt;span id=\"unique-id-23242\" class=\"text Matt-5-7\"&gt;&lt;span class=\"woj\"&gt;&lt;sup class=\"versenum\"&gt;7\u00a0&lt;\/sup&gt;\u201cBlessed are &lt;sup class='crossreference' value='(&lt;a href=\"#cunique-id-23242E\" title=\" E\"&gt;E&lt;\/a&gt;)'&gt;(&lt;a href=\"#cunique-id-23242E\" title=\" E\"&gt;E&lt;\/a&gt;)&lt;\/sup&gt;the merciful, for they shall receive mercy.&lt;\/span&gt;&lt;\/span&gt;&lt;\/p&gt; &lt;p&gt;&lt;span id=\"unique-id-23243\" class=\"text Matt-5-8\"&gt;&lt;span class=\"woj\"&gt;&lt;sup class=\"versenum\"&gt;8\u00a0&lt;\/sup&gt;\u201cBlessed are &lt;sup class='crossreference' value='(&lt;a href=\"#cunique-id-23243F\" title=\" F\"&gt;F&lt;\/a&gt;)'&gt;(&lt;a href=\"#cunique-id-23243F\" title=\" F\"&gt;F&lt;\/a&gt;)&lt;\/sup&gt;the pure in heart, for &lt;sup class='crossreference' value='(&lt;a href=\"#cunique-id-23243G\" title=\" G\"&gt;G&lt;\/a&gt;)'&gt;(&lt;a href=\"#cunique-id-23243G\" title=\" G\"&gt;G&lt;\/a&gt;)&lt;\/sup&gt;they shall see God.&lt;\/span&gt;&lt;\/span&gt;&lt;\/p&gt;",
              "footnotes":[
  
              ],
              "crossrefs":[
                 "&lt;li id=\"cunique-id-23240A\"&gt;&lt;a href=\"#unique-id-23240\" title=\" Matthew 5:5\"&gt;Matthew 5:5&lt;\/a&gt; : &lt;a href=\"\/passage\/?search=Ps 37:11&amp;version=ESV\" data-bibleref=\"Ps.37.11\"&gt;Ps. 37:11&lt;\/a&gt;&lt;\/li&gt;\n",
                 "&lt;li id=\"cunique-id-23240B\"&gt;&lt;a href=\"#unique-id-23240\" title=\" Matthew 5:5\"&gt;Matthew 5:5&lt;\/a&gt; : &lt;a href=\"\/passage\/?search=Ps 37:11&amp;version=ESV\" data-bibleref=\"Ps.37.11\"&gt;Ps. 37:11&lt;\/a&gt;&lt;\/li&gt;\n",
                 "&lt;li id=\"cunique-id-23241C\"&gt;&lt;a href=\"#unique-id-23241\" title=\" Matthew 5:6\"&gt;Matthew 5:6&lt;\/a&gt; : &lt;a href=\"\/passage\/?search=Ps 42:2, Isa 55:1-Isa 55:2, John 7:37&amp;version=ESV\" data-bibleref=\"Ps.42.2,Isa.55.1-Isa.55.2,John.7.37\"&gt;Ps. 42:2; Isa. 55:1, 2; John 7:37&lt;\/a&gt;&lt;\/li&gt;\n",
                 "&lt;li id=\"cunique-id-23241D\"&gt;&lt;a href=\"#unique-id-23241\" title=\" Matthew 5:6\"&gt;Matthew 5:6&lt;\/a&gt; : &lt;a href=\"\/passage\/?search=2Tim 2:22, Matt 6:33&amp;version=ESV\" data-bibleref=\"2Tim.2.22,Matt.6.33\"&gt;2 Tim. 2:22; [ch. 6:33]&lt;\/a&gt;&lt;\/li&gt;\n",
                 "&lt;li id=\"cunique-id-23242E\"&gt;&lt;a href=\"#unique-id-23242\" title=\" Matthew 5:7\"&gt;Matthew 5:7&lt;\/a&gt; : &lt;a href=\"\/passage\/?search=Matt 18:33, Matt 25:34-Matt 25:36, Prov 19:17, Luke 6:36, 2Tim 1:16, Heb 6:10&amp;version=ESV\" data-bibleref=\"Matt.18.33,Matt.25.34-Matt.25.36,Prov.19.17,Luke.6.36,2Tim.1.16,Heb.6.10\"&gt;ch. 18:33; 25:34-36; Prov. 19:17; Luke 6:36; 2 Tim. 1:16; Heb. 6:10&lt;\/a&gt;&lt;\/li&gt;\n",
                 "&lt;li id=\"cunique-id-23243F\"&gt;&lt;a href=\"#unique-id-23243\" title=\" Matthew 5:8\"&gt;Matthew 5:8&lt;\/a&gt; : &lt;a href=\"\/passage\/?search=Ps 24:4, 2Tim 2:22, 1Pet 1:22&amp;version=ESV\" data-bibleref=\"Ps.24.4,2Tim.2.22,1Pet.1.22\"&gt;Ps. 24:4; 2 Tim. 2:22; [1 Pet. 1:22]&lt;\/a&gt;&lt;\/li&gt;\n",
                 "&lt;li id=\"cunique-id-23243G\"&gt;&lt;a href=\"#unique-id-23243\" title=\" Matthew 5:8\"&gt;Matthew 5:8&lt;\/a&gt; : &lt;a href=\"\/passage\/?search=Heb 12:14, 1John 3:2-1John 3:3, Rev 22:4, 1Cor 13:12&amp;version=ESV\" data-bibleref=\"Heb.12.14,1John.3.2-1John.3.3,Rev.22.4,1Cor.13.12\"&gt;Heb. 12:14; 1 John 3:2, 3; Rev. 22:4; [1 Cor. 13:12]&lt;\/a&gt;&lt;\/li&gt;\n"
              ]
           },
           {
              "osis":" Mark 3:9",
              "content":"&lt;p&gt;&lt;span id=\"unique-id-24294\" class=\"text Mark-3-9\"&gt;&lt;sup class=\"versenum\"&gt;9\u00a0&lt;\/sup&gt;And he told his disciples to &lt;sup class='crossreference' value='(&lt;a href=\"#cunique-id-24294A\" title=\" A\"&gt;A&lt;\/a&gt;)'&gt;(&lt;a href=\"#cunique-id-24294A\" title=\" A\"&gt;A&lt;\/a&gt;)&lt;\/sup&gt;have a boat ready for him because of the crowd, lest they &lt;sup class='crossreference' value='(&lt;a href=\"#cunique-id-24294B\" title=\" B\"&gt;B&lt;\/a&gt;)'&gt;(&lt;a href=\"#cunique-id-24294B\" title=\" B\"&gt;B&lt;\/a&gt;)&lt;\/sup&gt;crush him,&lt;\/span&gt;&lt;\/p&gt;",
              "footnotes":[
  
              ],
              "crossrefs":[
                 "&lt;li id=\"cunique-id-24294A\"&gt;&lt;a href=\"#unique-id-24294\" title=\" Mark 3:9\"&gt;Mark 3:9&lt;\/a&gt; : &lt;a href=\"\/passage\/?search=Mark 6:32, Mark 6:45, Mark 8:10&amp;version=ESV\" data-bibleref=\"Mark.6.32,Mark.6.45,Mark.8.10\"&gt;ch. 6:32, 45 (Gk.); 8:10 (Gk.)&lt;\/a&gt;&lt;\/li&gt;\n",
                 "&lt;li id=\"cunique-id-24294B\"&gt;&lt;a href=\"#unique-id-24294\" title=\" Mark 3:9\"&gt;Mark 3:9&lt;\/a&gt; : &lt;a href=\"\/passage\/?search=Mark 5:24, Mark 5:31&amp;version=ESV\" data-bibleref=\"Mark.5.24,Mark.5.31\"&gt;ch. 5:24, 31&lt;\/a&gt;&lt;\/li&gt;\n"
              ]
           }
        ]
     }
  ]
  </code></pre>
  
  <p>Very ugly I know. Unfortunately it is someone else's web service, so there isn't much I can do. I've been messing around with the C# model class and can't quite seem to get it to work.</p>
  
  <p>Calling Method:</p>
  
  <pre><code>    2013-02-08 20:08:32.768 VersesiOS[36931:c07] Unhandled managed exception: Cannot deserialize JSON array into type 'Verses.Core.BibleGatewayVerses'. (Newtonsoft.Json.JsonSerializationException)
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureArrayContract (System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract) [0x00000] in &lt;filename unknown&gt;:0 
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.Object existingValue, System.String reference) [0x00000] in &lt;filename unknown&gt;:0 
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.Object existingValue) [0x00000] in &lt;filename unknown&gt;:0 
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueNonProperty (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract) [0x00000] in &lt;filename unknown&gt;:0 
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00000] in &lt;filename unknown&gt;:0 
    at Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00000] in &lt;filename unknown&gt;:0 
    at Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00000] in &lt;filename unknown&gt;:0 
    at Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in &lt;filename unknown&gt;:0 
    at Newtonsoft.Json.JsonConvert.DeserializeObject[BibleGatewayVerses] (System.String value, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in &lt;filename unknown&gt;:0 
    at Newtonsoft.Json.JsonConvert.DeserializeObject[BibleGatewayVerses] (System.String value) [0x00000] in &lt;filename unknown&gt;:0 
    at Verses.Core.BibleGateway+Response.GetVerseText (System.String requestUrl) [0x00047] in /Users/pierceboggan/Desktop/Verses/Verses.Core/Verses.Core/Web Services/BibleGateway.cs:111 
    at Verses.Core.BibleGateway.GetVerseText (System.String searchKeywords) [0x00012] in /Users/pierceboggan/Desktop/Verses/Verses.Core/Verses.Core/Web Services/BibleGateway.cs:43 
  </code></pre>
  
  <p>Model Class:</p>
  
  <pre><code>[JsonObject(MemberSerialization.OptIn)]
  public class BibleGatewayVerse
  {
      [JsonProperty("osis")]
      public string Reference { get; set; }
      [JsonProperty("content")]
      public string Content { get; set; }
      [JsonProperty("footnotes")]
      public List&lt;string&gt; Footnotes { get; set; }
      [JsonProperty("crossrefs")]
      public List&lt;string&gt; CrossReferences { get; set; }
  }
  
  [JsonObject(MemberSerialization.OptIn)]
  public class BibleGatewayVerses
  {
      [JsonProperty("data")]
      public List&lt;BibleGatewayVerse&gt; Verses;
  }
  </code></pre>
  
  <p>I've used tools such as json2csharp.com and they generate the same thing. I've also toyed around with using arrays instead of List, but to no avail. Additionally, I've also tried replacing the Footnotes List with the type object (as recommended by json2sharp). </p>
  
  <p>Any help would be greatly appreciated.</p>