Check if a streamer is streaming

instead of

$data = json_decode($json, true);

?