title: How to send JSON with dynamic properties using RestSharp?
body: <p>I want to create a JSON object that has one dynamic property to send a request to an external API. 
  Example:</p>
  
  <pre><code>{
      "prop1": "val1",
      "prop2": "val2",
      "prop3": {
          "dynamic_prop": "val"
      }
  }
  </code></pre>
  
  <p>This is the only code that gets me a valid response:</p>
  
  <pre><code>var request = new RestRequest(url, Method.PUT);
  request.AddHeader("content-type", "application/json");
  
  var body = new
  {
      prop1 = "val1",
      prop2 = "val2",
      prop3 = new { dynamic_prop = "val" }
  };
  
  request.AddJsonBody(body);
  </code></pre>
  
  <p>However, in this case <code>dynamic_prop</code> isn't dynamic. And as I've read anonymous types can't have dynamic props.</p>
  
  <p>I tried using <code>JObject</code>:</p>
  
  <pre><code>var jobject = JObject.Parse("{\"dynamic_prop\":\"val\"}");
  var body = new
  {
      prop1 = "val1",
      prop2 = "val2",
      prop3 = jobject
  };
  </code></pre>
  
  <p>However the <code>JObject</code> isn't serialized properly, I get <code>[[[]]]</code>, I'm guessing because that object has numerous other properties (First, ChildrenTokens etc), same goes for <code>JToken</code>. I also tried with <code>ExpandoObject</code> and couldn't get it to work.</p>