Convert dictionary object into Json string
<p>I have a dictionary object which is declared as shown below.</p>

<pre><code>Dictionary&lt;string, Dictionary&lt;int, List&lt;DataRow&gt;&gt;&gt; lineList = new Dictionary&lt;string, Dictionary&lt;int, List&lt;DataRow&gt;&gt;&gt;();
</code></pre>

<p>I want to convert this object into Json string but when I used following code, It only considered first object from dictionary list and then added rest of the data in it regardless of for which key it is connected. </p>

<pre><code>var linechartString = JsonConvert.SerializeObject(lineList);
</code></pre>

<p>I would like to know if there is a different function available which can convert my dictionary object into JSON string.</p>