Getting a parser error when trying to serialize a ulong array, looks like the Json.NET library isnt checking if the integer is signed or unsigned; any one know of a workaro
ECMA-262, the standard on which JSON is based, specifies in section 4.3.19 that number values are IEEE double-precision floating point values, commonly seen as the "double" type in C-like languages. This encoding is not sufficiently precise to represent all possible values of 64 bit integers.
Therefore, encoding 64 bit integers (signed or otherwise) in JSON may lead to a loss in precision if it passes through any code which processes it in keeping with the standard. As seen in JSON.net, it might also break code which does not correctly implement the standard, but rather assumes that people won't try to do failure-prone things.
You're right, JSON.Net doesn't handle values larger than long.MaxValue in this case.
I didn't find any way to modify that behavior, except by modifying the source code of the library. As a workaround, you could deserialize it as decimal[] and then convert that into ulong[].