PHP json_decode() returns NULL with valid JSON?

This worked for me

json_decode( preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $json_string), true );

Leave a Comment