How to convert a dynamic object to JSON string c#?
<p>I have the following dynamic object that I'm getting from a third party library:</p>

<pre><code>IOrderStore os = ss.GetService&lt;IOrderStore&gt;();
IOrderInfo search = os.Orders.Where(t =&gt; t.Number == "test").FirstOrDefault();
IOrder orderFound = os.OpenOrder(search, true);

dynamic order = (dynamic)orderFound;
dynamic requirements = order.Title.Commitments[0].Requirements;
</code></pre>

<p>I need to parse it to a JSON string.</p>

<p>I tried this (using JSON.net):</p>

<pre><code>string jsonString = JsonConvert.SerializeObject(requirements);
return jsonString;
</code></pre>

<p>But I get a seemingly corrupted JSON string, as below:</p>

<blockquote>
  <p>[{"$id":"1"},{"$id":"2"},{"$id":"3"},{"$id":"4"},{"$id":"5"},{"$id":"6"},{"$id":"7"},{"$id":"8"},{"$id":"9"},{"$id":"10"},{"$id":"11"},{"$id":"12"},{"$id":"13"},{"$id":"14"},{"$id":"15"}]</p>
</blockquote>

<p>The object contains multiple properties, and not just the 'id'.</p>

<p>Any advice?</p>