Thanks for the comments and links.
For the next person who finds this thread, the following regex works
like a charm:
$new_json = preg_replace( '/id:(\d+)/', 'id:\1', $json );
On Aug 22, 12:29 pm, Chad Etzel jazzyc...@gmail.com wrote:
HiJSJ,
What version of PHP are you using? I know there
That is helpful to know. So possibly this is isolated to the PHP
json_decode() functionality.
In my case, I get the following JSON decoded string from twitter
(happens to be empty result set):
{results:[],since_id:3448308315,max_id:
3450048057,refresh_url:?
Hi JSJ,
What version of PHP are you using? I know there was a fix in
json_decode that went into the latest version (at least for 64 bit
version).
There is a thread discussing a similar workaround here:
http://www.sitepoint.com/forums/showthread.php?t=628346
-Chad
On Fri, Aug 21, 2009 at 12:00
PHP doesn't support 64 bit integers. Thats the problem.
Most of the other language doesnt have this problem. But PHP is used
in most web sites.
I suggest you use BIGINT as db column type. and when storing the id
check if its a negetive number. If its negetive number, add the id
(since_id, id,
Recently my twitter search API code stopped working properly (using
search.json). After tracking down the issue here is what I think is
going on:
- Recently, the status/message IDs returned by the search API began
exceeding the maximum positive integer allowed on 32-bit OS platforms
we've seen this before on this list, and the suggestion i came up with is to
manually parse the JSON for integer values (wouldn't be that hard) and wrap
them in strings.
On Fri, Aug 21, 2009 at 08:58, JSJ jimstj...@gmail.com wrote:
I have not seen this issue discussed anywhere yet.
Recently