You will need to encode the number as a string on the server or write your own JSON parser in JavaScript to handle too large numeric constants.
(There is at least one more question about SO, which is almost the same as this one.)
edit - it’s a pity that I missed the part where you said that you can’t change the encoding. Well, the good news is that you should be able to use the JSON2 parser source and modify it, perhaps to interpret all numerical constants as strings, or even more than a certain number of digits.
In fact, the json2.js parser is just a sanitizer that ensures that calling eval() does not cause a problem. Well, I think this approach is your only option. If the structure of your JSON expressions is regular and fairly simple, you can "fix" their preliminary analysis using a regular expression, but if not, it will be a JSON parser in JavaScript.
source share