Skip to content

Instantly share code, notes, and snippets.

@rarous
Created November 1, 2018 06:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rarous/aa4211a94a04b9017f4928111a69bf94 to your computer and use it in GitHub Desktop.
Save rarous/aa4211a94a04b9017f4928111a69bf94 to your computer and use it in GitHub Desktop.
Quick experiment of JSON integers serialisation
JSON.parse(JSON.stringify({"arbitrary": Math.pow(2, 128), "arbitrary+1": Math.pow(2, 128) + 1, "arbitrary-1": Math.pow(2, 128) - 1, "64bit": Math.pow(2, 64), "64bit+1": Math.pow(2, 64) + 1, "64bit-1": Math.pow(2, 64) - 1, "53bit": Math.pow(2, 53), "53bit+1": Math.pow(2, 53) + 1, "53bit-1": Math.pow(2, 53) - 1,"32bit": Math.pow(2, 32), "32bit+1": Math.pow(2, 32) + 1, "32bit-1": Math.pow(2, 32) - 1,}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment