Loading JSON Dates
JSON is a great format for serializing data, but unfortunately it does not support dates.
The Problem
If you serialize an object that contains date fields using JSON.stringify, the dates will be converted to strings. If you then parse the same object back using JSON.parse, they will remain strings.
Note how the "Date" column contains strings in the example below:
The Solution
The solution for this problem is to use a 'reviver' function in the call to JSON.parse that will inspect the strings and convert those that look like dates into date objects.
Following is a grid showing the same data, this time parsed with a date reviver function: