title: Receiving JSON data on Web API Visual Studio C#
body: <p>I have a web api which is receiving some POST data.
  I am able to parse the JSON string when the elements are not nested - but the nested ones just will not parse at all...</p>
  
  <p>Here is the JSON I am receiving:</p>
  
  <pre><code>{
      "wlauth": {
          "userid": "user",
          "password": "pass"
      },
      "ident": "01234567890",
      "identtype": "imsi",
      "message": "VGVzdCBNZXNzYWdl"
  }
  </code></pre>
  
  <p>Here is the code from the Controller that handles the Post request:</p>
  
  <pre><code>public IHttpActionResult ReceiveSMSData(SMSReturned data)
  {
   Debug.WriteLine(data.userid);
   Debug.WriteLine(data.password);
   Debug.WriteLine(data.Ident);
   Debug.WriteLine(data.identtype);
   Debug.WriteLine(data.message);
   return Ok();
  }
  </code></pre>
  
  <p>From this I get the following in the debug console (the first two lines are blank):</p>
  
  <pre><code>'
  
  
  01234567890
  imsi
  VGVzdCBNZXNzYWdl'
  </code></pre>
  
  <p>So in other words, the non-nested elements appear fine, but the nested ones do not - what should I be doing differently to retrieve those nested elements?</p>
  
  <p>Edit:</p>
  
  <p>Here is the SMSReturned Class:</p>
  
  <pre><code>public class SMSReturned
  {
      public string wlauth { get; set; }
      public string Ident { get; set; }
      public string identtype { get; set; }
      public string message { get; set; }
      public string userid { get; set; }
      public string password { get; set; }
  
  }
  </code></pre>