For when you need to know JSON is valid, but don't need to parse it:

<?php
$valid 
json_validate('{ "test": { "foo": "bar" } }');

$valid json_validate('{ "": "": "" } }');
var_dump($validjson_last_error(), json_last_error_msg());
Output