The JsonToken
enum
in Newtonsoft.Json
namespace
contains, among others, the entry JsonToken.StartConstructor
.
I most likely misinterpret the meaning of this token, as I take it for granted that JS's constructor methods are not valid in JSON, the same as there are no function
, expression, or var
tokens.
So how would a constructor be manifested in JSON, if that's what it is?
Looking at the ParseTests
source code, it looks like it's so that you can have JSON like this:
{ "date": new Date(2017, 2, 10) }
... which isn't actually valid JSON, but may be common in the wild.
See more on this question at Stackoverflow