This method was introduced as part of an enhancement to allow Json.NET to parse date literals when represented with JavaScript constructors like so: new Date(1234656000000)
. For details, see Serializing Dates in JSON. Even though this syntax is not strictly valid according to the JSON standard, apparently there was enough demand to support it that Newtonsoft put it in.
Thus it was necessary to add low-level methods to JsonWriter
and JsonReader
to write and read literals in this format. (Strictly speaking I suppose writing could have been tacked on to WriteRaw
, this would have been kind of hackey, and anyway there is no method ReadRaw
) WriteStartConstructor
is one of these low-level utility methods.
There is also a high-level Linq-to-JSON class JConstructor
to represent this syntax. You can use it to support other specific JavaScript constructors as needed, for instance see How to convert new Date(year, month, day) overload with JSON.Net.