It turns out json_decode by default casts large integers as floats. This option can be overwritten in the function call:
$json_array = json_decode($json_string, , , 1);
I'm basing this only on the main documentation, so please test and let me know if it works.