title: DataContractJsonSerializer - Deserializing DateTime within List<object>
body: <p>I'm having trouble using the <a href="http://msdn.microsoft.com/en-us/library/system.runtime.serialization.json.datacontractjsonserializer.aspx" rel="noreferrer"><code>System.Runtime.Serialization.Json.DataContractJsonSerializer</code></a> class to deserialize DateTime instances contained within a <code>List&lt;object&gt;</code>. I cannot seem to get DateTime to deserialize back into the original type. The <code>DataContractJsonSerializer</code> always deserializes it into a string type with the format <code>"/Date(1329159196126-0500)/"</code>. It'll serialize and deserialize fine if I run it through using a strongly typed <code>List&lt;DateTime&gt;</code>, however I am looking for  way to get the serializer to identify and properly deserialize DateTimes when encountered within a simple list or array of <code>object</code>.</p>
  
  <p>Note that DateTimes are the only type besides primitives and strings that this list will ever contain.
  Here is the code snippet I'm using to test this.</p>
  
  <pre><code>var list = new List&lt;object&gt; { 27, "foo bar", 12.34m, true, DateTime.Now };
  var serializer = new DataContractJsonSerializer(typeof (List&lt;object&gt;));
  using (MemoryStream ms = new MemoryStream())
  {
      serializer.WriteObject(ms, list);
      ms.Position = 0;
      var deserializedList = serializer.ReadObject(ms) as List&lt;object&gt;;
  }
  </code></pre>