title: Deserializing JSON into an object with Json.NET
body: <p>I'm playing a little bit with the new <a href="https://blog.stackoverflow.com/2010/03/stack-overflow-api-private-beta-starts/">StackOverflow API</a>. Unfortunately, my JSON is a bit weak, so I need some help.</p>
  <p>I'm trying to deserialize this JSON of a User:</p>
  <pre><code>  {&quot;user&quot;:{
      &quot;user_id&quot;: 1,
      &quot;user_type&quot;: &quot;moderator&quot;,
      &quot;creation_date&quot;: 1217514151,
      &quot;display_name&quot;: &quot;Jeff Atwood&quot;,
      ...
      &quot;accept_rate&quot;: 100
    }}
  </code></pre>
  <p>into an object which I've decorated with <code>JsonProperty</code> attributes:</p>
  <pre><code>[JsonObject(MemberSerialization.OptIn)]
  public class User
  {
      [JsonProperty(&quot;user_id&quot;, Required = Required.Always)]        
      public virtual long UserId { get; set; }
  
      [JsonProperty(&quot;display_name&quot;, Required = Required.Always)]
      public virtual string Name { get; set; }
  
      ...
  }
  </code></pre>
  <p>I get the following exception:</p>
  <blockquote>
  <p>Newtonsoft.Json.JsonSerializationException:
  Required property 'user_id' not found
  in JSON.</p>
  </blockquote>
  <p>Is this because the JSON object is an array? If so, how can I deserialize it to the one User object?</p>
  <p>Thanks in advance!</p>