This project has moved and is read-only. For the latest updates, please go here.

deserializing single date

May 26, 2011 at 1:40 PM


I need to deserialize a json string containing a single DateTime value like /Date(1306360800000)/

"Easy" I thought (but am totally new to Json.NET) and tried the following:

var d = JsonConvert.DeserializeObject<DateTime>("/Date(1306360800000)/");

But that's giving me a strange JsonReaderException: Error parsing comment. Expected: *. Line 1, position 2.

Why is it expecting a comment? Am I missing something simple?

Any help appreciated!