How to build a Json tree
<p>Here's the json I want to build:</p>

<pre><code>{
    id: 0,
    item: [{ id: 1, text: "1111"
    }, {
        id: 2,
        text: "222222",
        item: [{ id: "21", text: "child" }]
        }, {
        id: 3, text: "3333"
    }]
}
</code></pre>

<p>For now I can not build a tree, I can only build something like this:</p>

<pre><code>[{"id":1,"text":"1111"},{"id":21,"text":"child"]
</code></pre>

<p>I'm building it with this code:</p>

<pre><code>var serializer = new JavaScriptSerializer();
var jsonString = serializer.Serialize(listOfPairsOfTextAndId);
</code></pre>

<p>But how can I build the given tree in c#?</p>
