Well one simple test would be to simply echo/print the values that you get after decoding such data, e.g.:
$string = '{"username":"john","secret_key":"123","password":"smith"}';
$json_a=json_decode($string,true);
$username = $json_a["username"];
$secret_key = $json_a["secret_key"];
$password = $json_a["password"];
echo "Username: $username, Secret_key: $secret_key, Password: $password";
You can do something similar inside your script to simulate the above JSON-encoded string being received (just comment out the statement(s) that would have yielded that data and replace it with a constant assignment like I did above).