Deserialize json into model : <p>I have a json like this:</p>

<pre><code>[  
   {  
      \"childNodes\":null,
      \"children\":null,
      \"key\":\"\",
      \"subKey\":{  
         \"buffer\":\"\",
         \"offset\":0,
         \"length\":0,
         \"value\":\"\",
         \"hasValue\":true
      },
      \"isContainerNode\":false,
      \"rawValue\":null,
      \"attemptedValue\":null,
      \"errors\":[  
         {  
            \"exception\":null,
            \"errorMessage\":\"Incorrect password.\"
         }
      ],
      \"validationState\":1
   }
]
</code></pre>

<p>So I want to deserialize it into model, so I create model like:</p>

<pre><code> public  class JsonDeserializeModel
    {

        public class SubKey
        {
            public string buffer { get; set; }
            public int offset { get; set; }
            public int length { get; set; }
            public string value { get; set; }
            public bool hasValue { get; set; }
        }

        public class Error
        {
            public object exception { get; set; }
            public string errorMessage { get; set; }
        }

        public class RootObject
        {
            public object childNodes { get; set; }
            public object children { get; set; }
            public string key { get; set; }
            public SubKey subKey { get; set; }
            public bool isContainerNode { get; set; }
            public object rawValue { get; set; }
            public object attemptedValue { get; set; }
            public List&lt;Error&gt; errors { get; set; }
            public int validationState { get; set; }
        }
    }
</code></pre>

<p>Then I try to deserialize as:</p>

<pre><code>  JsonDeserializeModel completeObject = JsonConvert.DeserializeObject&lt;JsonDeserializeModel&gt;(response.content);
</code></pre>

<p>But it throws exception:</p>

<blockquote>
  <p>Newtonsoft.Json.JsonSerializationException: 'Cannot deserialize the
  current JSON array (e.g. [1,2,3]) into type
  'Project.Models.JsonDeserializeModel' because the type requires a
  JSON object (e.g. {"name":"value"}) to deserialize correctly. To fix
  this error either change the JSON to a JSON object (e.g.
  {"name":"value"}) or change the deserialized type to an array or a
  type that implements a collection interface (e.g. ICollection, IList)
  like List that can be deserialized from a JSON array.
  JsonArrayAttribute can also be added to the type to force it to
  deserialize from a JSON array. Path '', line 1, position 1.'</p>
</blockquote>

<p>I didn't understand where the error is. Can someone knows or have more experience to know what is wrong? Regards</p>
