title: C# Deserialize JSON string into object using Newtonsoft.Json
body: <p>I am trying to convert a json string to an object using Newtonsoft.json, but I am having some problems with the following conversion. I wonder if some one can explain this. thanks. </p>
  
  <pre><code>AddFaceResponse ir = JsonConvert.DeserializeObject&lt;AddFaceResponse&gt;(responseContentStr);
  </code></pre>
  
  <p>this is the json string responseContentStr</p>
  
  <pre><code>[{
      "faceId": "1fe48282-a3b0-47d1-8fa8-67c4fac3d984",
      "faceRectangle": {
          "top": 80,
          "left": 50,
          "width": 147,
          "height": 147
      }
  }]
  </code></pre>
  
  <p>This is my model object. </p>
  
  <pre><code>public class AddFaceResponse
      {
          public class Face
          {
              public class FaceRectangle
              {
                  public int top, left, width, height;
                  public FaceRectangle(int t, int l, int w, int h)
                  {
                      top = t;
                      left = l;
                      width = w;
                      height = h;
                  }
              }
              public string faceId;
              public FaceRectangle faceRectangle;
              public Face(string id, FaceRectangle fac)
              {
                  faceId = id;
                  faceRectangle = fac;
              }
          }
  
          Face[] faces;
          public AddFaceResponse(Face[] f)
          {
              faces = f;
          }
      }
  </code></pre>
  
  <p>this is the error I am getting from visual studio. </p>
  
  <blockquote>
    <p>Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type
    'App2.AddFaceResponse' because the type requires a JSON object (e.g.
    {"name":"value"}) to deserialize correctly</p>
  </blockquote>