title: How I deserialize a dynamic json property with RestSharp in C#?
body: <p>I have a web service (I can't edit) with this structure:</p>
  
  <p><strong>/users</strong></p>
  
  <pre><code>{
      "response" : {
          "users": [{"name": "John"},{"name": "Jack"}]
      },
      "page" : { "current":1, "total":1}
  }
  </code></pre>
  
  <p><strong>/pets</strong></p>
  
  <pre><code>{
      "response" : {
          "pets": [{"name": "Fido"},{"name": "Tweety"}]
      },
      "page" : { "current":1, "total":1}
  }
  </code></pre>
  
  <p>As you can see the property name in the "response" property changes.
  How can deserialize a generic response with RestSharp? I don't want to write a Response class for every resource.</p>
  
  <p>I have written the following generic Response class</p>
  
  <pre class="lang-cs prettyprint-override"><code>class RestResponse{
      public ResponseBody response { get; set; }
      public ResponsePage page { get; set; }
  }
  
  class ResponseBody {
      public List&lt;dynamic&gt; resourceList { get; set; } 
  }
  
  class ResponsePage {
      public int current { get; set; }
      public int total { get; set; }
  }
  
  class User { public string name {get; set;} }
  
  class Pet { public string name {get; set;} }
  </code></pre>
  
  <p>Of course RestSharp can't link the dynamic json property with the ResponseBody.list attribute. 
  How can I do this?</p>