After playing with the Json.NET library, I'm wondering why you would choose to use the IsoDateTimeConverter over the JavascriptDateTimeConverter.
I found this to be easier to use with the Ext JS interfaces that I was using when serializing dates from an MVC Controller.
JsonNetResult jsonNetResult = new JsonNetResult();
jsonNetResult.Formatting = Formatting.Indented;
jsonNetResult.SerializerSettings.Converters.Add(new JavaScriptDateTimeConverter());
jsonNetResult.Data = myObject;
I'm getting this data back into an Ext.data.JsonStore which is able to get the returned value as a date without me having to specify a date format to parse with.
store:new Ext.data.JsonStore({
url: pathContext + '/Subject.mvc/Notices',
baseParams: { subjectId: this.subjectId },
fields: [
{name: 'Title'},
{name: 'DateCreated', type: 'date' }
]
}),
The JSON returned looks like this:
[{"Title":"Some title","DateCreated":new Date(1259175818323)}]
There isn't any reason to convert to ISO 8601 format and back if you don't have to.