I am building a Node backend which pulls data from the Vine API, and returns this to my front end. The IDs for posts and users are of type Number, and they frequently exceed the maximum integer that javascript can support, according to this question.
An example ID from the API is 934416748524998656
. When I use JSON.parse
on the front end it replaces those last 2 digits with 0, because it can't read a number that high This causes problems when I try to talk to the API with specific IDs, as it now doesn't recognise the ID.
Is there anything, short of creating a new service in another language, that I can do to work with these IDs? I tried using toString()
to interpret the numbers as strings instead, but that just creates a string of the already malformed number.
Thanks for any help