TLDR: If you use long integers as primary keys then encode them as JSONString (not JSONNumber) to prevent a loss of precision.
I have found that if you encode long integers (I believe more than 15 digits) as JSON they are converted to exponential notation as expected. The problem is that when they are decoded they will no longer match the original value.
) // = 1.20636608788829e+40
This is particularly problematic if you pass long numeric primary keys in JSON objects encoded as JSONNumber. Encoding them as JSONString gets round the problem, but if you aren't putting the resulting string in a number field you'll need to use GetAsNumber to convert the result back to a number afterwards.