Is there any way to check that a variable is a valid JSON string in PHP without using json_last_error()? I don\'t have PHP 5.3.3.
json_last_error()
$data = json_decode($json_string); if (is_null($data)) { die("Something dun gone blowed up!"); }