Is there a way to designate that the Type of a
JToken is of type
long? I noticed that only
floats are supported via https://github.com/JamesNK/Newtonsoft.Json/blob/master/Src/Newtonsoft.Json/Linq/JTokenType.cs and wonder how people handle the higher precision cases.
JSON doesn't distinguish between
float. It doesn't even really distinguish between integers and non-integers - they're just numbers.
JsonTokenType.Float isn't really meant to indicate
System.Single - it's "a floating point number". Likewise
JsonTokenType.Integer isn't meant to indicate
System.Int32 - it's "an integer".
For examples of this, look at
longsets the token type to
doublesets the token type to
decimalsets the token type to
See more on this question at Stackoverflow