title: How to deserialize JSON text into a date type using Windows 8 JSON.parse?
body: <p>I'm building a Windows 8 Metro app (aka "Modern UI Style" or "Windows Store app") in HTML5/JavaScript consuming JSON Web Services and I'm bumping into the following issue: <strong>in which format should my JSON Web Services serialize dates for the Windows 8 Metro <em>JSON.parse</em> method to deserialize those in a date type?</strong></p>
  
  <p>I tried:</p>
  
  <ul>
  <li>sending dates using the <a href="http://en.wikipedia.org/wiki/ISO_8601" rel="nofollow">ISO-8601 format</a>, (JSON.parse returns a string),</li>
  <li>sending dates such as "/Date(1198908717056)/" as <a href="http://weblogs.asp.net/bleroy/archive/2008/01/18/dates-and-json.aspx" rel="nofollow">explained here</a> (same result).</li>
  </ul>
  
  <p>I'm starting to doubt that Windows 8's JSON.parse method supports dates as even when parsing the output of its own JSON.stringify method does not return a date type.</p>
  
  <p>Example:</p>
  
  <pre><code>    var d = new Date(); // =&gt; a new date
      var str = JSON.stringify(d); // str is a string =&gt; "\"2012-07-10T14:44:00.000Z\""
      var date2 = JSON.parse(str); // date2 is a string =&gt; "2012-07-10T14:44:00.000Z"
  </code></pre>