Using ajax i request a authenticationID like this:
This is wrong because the real HTTP-Transfer is this:
(By the way: response-type is "application/json;charset=UTF-8")
I see a clash between
-1369082024195183657 and
-1369082024195183600
How to prevent the rounding or is it a bug?
jQuery tries to parse the HTTP response as integer based on the JSON content-type.
> JSON.parse("-1369082024195183657")
-1369082024195183600
You can override it by telling jQuery you expect a string by setting the dataType
property in $.ajax
configuration:
$.ajax({
dataType : "text",
url : "rest/Registration",
success : function(data){
// data should be "-1369082024195183657"
}
})
I guess you don't need to do any arithmetic operations on an authenticationID token, so you can just keep it as a string.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With