title: Create JSON object from string in C#
body: <p>I am trying to create a JSON string which contains one container and one array. 
  I can do this by using a stringbuilder but I am trying to find a better way to get the JSON string; I want:</p>
  
  <pre><code>{ "message":{ "text":"test sms"},"endpoints":["+9101234"]} 
  </code></pre>
  
  <p>I tried  this:</p>
  
  <pre><code>string json = new JavaScriptSerializer().Serialize(new
                {
                    text = "test sms",
                    endpoints = "[dsdsd]"
                });
  </code></pre>
  
  <p>And the output is:</p>
  
  <pre><code>{"text":"test sms","endpoints":"[dsdsd]"}
  </code></pre>
  
  <p>Any help or suggestions how to get the required format?</p>