Hi, im writting a twitter mashup service. When i receive the json data, some of the twit ids are greater than 2147483647 (which is the maximum allowed integer on 32bit servers).
I came up with a solution that works, which is converting the integers to strings; that way the json_decode() function won't have any problems when trying to generate the array.
This is what i need to achieve:
Before (original JSON data)
[{"name":"john","id":5932725006},{"name":"max","id":4953467146}]
After (solution applied)
[{"name":"john","id":"5932725006"},{"name":"max","id":"4953467146"}]
I'm thinking of a preg_match implementation, but i have no idea on how to do it bullet-proof. Any help will be much appreciated.