Last active
December 10, 2015 22:58
-
-
Save gre/4505517 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Imagine a web server storing tweet_id reference as Long. | |
* For instance, 289455363407884288L | |
* Now, let's say I send it to javascript as JS number: | |
*/ | |
var myWebserviceResponse = { tweetId: 289455363407884288 /*, ...*/ }; | |
doSomethingWith(myWebserviceResponse.tweetId); | |
// ... | |
console.log("https://twitter.com/greweb/status/"+289455363407884288) | |
// <- You have just missed my tweet! | |
// Solution | |
var myWebserviceResponse = { tweetId: "289455363407884288" /*, ...*/ }; | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment