<h1>
    Loading JSON Dates
</h1>
<p>
    JSON is a great format for serializing data, but unfortunately
    it does not support dates.
</p>

<h3>
    The Problem
</h3>
<p>
    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.
</p>
<p>
    Note how the "Date" column contains strings in the example below:
</p>
@Html.C1().FlexGrid().Id("theGridBad")

<h3>
    The Solution
</h3>
<p>
    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.
</p>
<p>
    Following is a grid showing the same data, this time parsed
    with a date reviver function:
</p>
@Html.C1().FlexGrid().Id("theGridGood")