title: C# JSON.Net CustomCreationConverter with parent object
body: <p>How do I extract via the Deserialization the payload of the returned json response that is encapsulated within the <code>data</code> object of the response?</p>
  
  <p>This is the json response:</p>
  
  <pre><code>  {"data":{"status":"ok","created_at":"2017-05-26 17:34:12.224524Z","app_version":1.0,"api_version":1.0}}
  </code></pre>
  
  <p>My Converter Class</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using Newtonsoft.Json.Converters;
  
  namespace Sample.Models
  {
      class StatusConverter : CustomCreationConverter&lt;Status&gt;
      {
          public override Status Create(Type objectType)
          {
  
              return new Status();
          }
       }
  }
  </code></pre>
  
  <p>My Model for <code>Status</code></p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using Newtonsoft.Json;
  
  namespace Sample.Models
  {
  
      class Status
      {
          [JsonProperty("app_version")]
          public string AppVersion { get; set; }
  
          [JsonProperty("api_version")]
          public string APIVersion { get; set; }
  
          [JsonProperty("status")]
          public string CurrentStatus { get; set; }
  
      }
  }
  </code></pre>
  
  <p>API Call using <code>RestClient</code></p>
  
  <pre><code>    public void checkConnectivityStatus()
      {
          var client = new RestClient(BaseUrl);
  
          var request = new RestRequest("status", Method.GET);
  
          IRestResponse response = client.Execute(request);
          var content = response.Content; // raw content as string
          Status status = JsonConvert.DeserializeObject&lt;Status&gt;(content, new StatusConverter());
          Console.Write(status.AppVersion);
      }
  </code></pre>
  
  <p>Edit: Updating the Model</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using Newtonsoft.Json;
  
  namespace Sample.Models
  {
      public interface IStatus
      {
          string AppVersion { get; set; }
  
          string APIVersion { get; set; }
  
          string CurrentStatus { get; set; }
      }
  
      [JsonObject]
      class Status : IStatus
      {
          [JsonProperty("app_version")]
          public string AppVersion { get; set; }
  
          [JsonProperty("api_version")]
          public string APIVersion { get; set; }
  
          [JsonProperty("status")]
          public string CurrentStatus { get; set; }
  
      }
  }
  </code></pre>