title: How to translate PHP JSON web service to C#?
body: <p>I've been writing an iPhone app that could send JSON to a PHP file and been fairly successful doing this.  However, now that I want to move on to ASP C# and create an equivalent .NET web service akin to the PHP I wrote earlier to decode and encode the JSON, I'm completely clueless.</p>
  
  <p>In PHP I do this:</p>
  
  <pre><code>$handle = fopen('php://input','r');
  $jsonInput = fgets($handle);
  $decoded = json_decode($jsonInput,true);
  </code></pre>
  
  <p>to receive the JSON POST data and decode it . Then using this:</p>
  
  <pre><code>$data = $decoded;
  header('Content-Type: application/json');
  echo json_encode($data);
  </code></pre>
  
  <p>How do I write an equivalent C# web service? Thanks.</p>