title: How to get Json.Net to serialize / deserialize dynamic / generic object from documentDB without ignoring subprops?
body: <p>In documentdb I have some json structure. </p>
  
  <pre><code>{ "blah": "blahblahblah", 
    "blah": null, 
    "dynamicBlah": {
        "propertyhere": [
          "xyz"
        ]
     }, 
  }
  </code></pre>
  
  <p>In my c# model that this deserializes into 
  an object just fine EXCEPT The dynamicBlah object is there as a JObject but its when returned as a JSONResult to the client (serialized again) that property just comes out like this...</p>
  
  <pre><code>"dynamicBlah": [
      [
          [
               []
          ]
      ]
   ]
  </code></pre>
  
  <p>A few things:</p>
  
  <ul>
  <li>The purpose of that property is just to pass through any custom json in the record so the type could be anything so it must be a dynamic or object type.</li>
  <li>I can't just deserialize it to a string because some C# may need to access that object and it'd be a pain to have to constantly convert it to json and back</li>
  <li>I know Json.net can serialize/deserialize objects and dynamics because I've done it elsewhere with no issue. However there's something about getting it from document db that makes the serializer ignore the sub properties of the dynamic.</li>
  <li>yes I've tried marking it [JsonProperty] </li>
  <li>yes I've tried it as both dynamic and object</li>
  <li>Json.net obviously recognizes there's somthing there because it outputs multiple empty levels of json. </li>
  <li>this happens when the object is both an object and a collection</li>
  </ul>
  
  <p>Can anyone tell me how to get Json.net to not ignore the sub properties? The end result should be the same json structure is it is in documentdb.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>No making it a Dictionary doesnt work since that only types the top level so I end up with </p>
  
  <pre><code>"dynamicBlah": {"xyz": [
          []
      ]
  }
  </code></pre>
  
  <p>When xyz would be another object or a list of strings or anything at all...</p>