title: Using JObject and JProperty with JSON.Net 4.0
body: <p>I'm trying to deserialize JSON in this format:</p>
  
  <pre><code>{
     "data": [
        {
           "installed": 1,
           "user_likes": 1,
           "user_education_history": 1,
           "friends_education_history": 1,
           "bookmarked": 1
        }
     ]
  }
  </code></pre>
  
  <p>to a simple string array like this:</p>
  
  <pre><code>{
      "installed",
      "user_likes",
      "user_education_history",
      "friends_education_history",
      "bookmarked"
  }
  </code></pre>
  
  <p>using <code>JSON.NET 4.0</code></p>
  
  <p>I've gotten it to work using the `CustomCreationConverter'</p>
  
  <pre><code>public class ListConverter : CustomCreationConverter&lt;List&lt;string&gt;&gt;
  {
  public override List&lt;string&gt; Create(Type objectType)
  {
      return new List&lt;string&gt;();
  }
  
  public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
  {
      var lst = new List&lt;string&gt;();
  
      //don't care about the inital 'data' element
      reader.Read();
  
      while (reader.Read())
      {
          if (reader.TokenType == JsonToken.PropertyName)
          {
              lst.Add(reader.Value.ToString());
          }
      }
      return lst;
  }
  }
  </code></pre>
  
  <p>but this really seems like overkill, especially if I want to create one for many different json responses.</p>
  
  <p>I've tried using <code>JObject</code> but it doesn't seem like I'm doing it right:</p>
  
  <pre><code>List&lt;string&gt; lst = new List&lt;string&gt;();
  JObject j = JObject.Parse(json_string);
  foreach (JProperty p in j.SelectToken("data").Children().Children())
  {
      lst.Add(p.Name);
  }
  </code></pre>
  
  <p>Is there a better way to do this?</p>