title: How to serialize Nested JSON?
body: <p>I have following nested JSON:</p>
  
  <pre><code>{"Command":"helo", 
   "parameter" :  {"Configured":false, "ApplicationString":"Something",  "Hostname":"some",
   "IPAddress":"0.0.0.0",
   "UniqueID":"",
   "Username":"me"}}
  </code></pre>
  
  <p>And I need to pass this string as JSON object to POST call to my web service in C#. Could anyone help me how to do this step?</p>
  
  <p>Note: I am able to pass simple JSON like below:</p>
  
  <pre><code>var request = (HttpWebRequest)WebRequest.Create("http://localhost:8084");
  request.ContentType = "text/json";
  request.Method = "POST";
  
  using (var streamWriter = new    StreamWriter(request.GetRequestStream()))
  {
      string json = new JavaScriptSerializer().Serialize(new
      {
          Command = "test",
          name="pooja"
      });
  
      streamWriter.Write(json);
  }
  </code></pre>
  
  <p>If I follow the same way to pass nested json like below :</p>
  
  <pre><code> string json = new JavaScriptSerializer().Serialize(new
                  {
                      Command = "test",
                      parameter = new JavaScriptSerializer().Serialize(new
                      {
                          Command = "test",
                      }),
  
                  });
  </code></pre>
  
  <p>I get below output :
   {"Command":"test","parameter":"{\"Command\":\"test\"}"}</p>