Reputation: 133
I have a "json" string that contain long int value when i want to json_decode long int value changes to float(3.6677890000187E+14) help me please thanks
Upvotes: 0
Views: 37
Reputation: 320
use JSON_BIGINT_AS_STRING
as 2nd argument for json_decode
like below
json_decode($str, false, 512, JSON_BIGINT_AS_STRING)
php.net/manual/en/function.json-decode.php
Upvotes: 1