"$message", "incidentID"=>$incident])); } function RespondJSON($array, $shouldExit = true) { header("Content-Type: application/json"); $json = API::PrettyJSONEncode($array); if($shouldExit){ exit($json); }else{ echo($json); } } function PrettyJSONEncode($array){ return json_encode($array, JSON_PRETTY_PRINT); } } //EOF