X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FJSON.php;h=00287a5eaab62c25176b42a434b76782f3ca6684;hb=f1929672aa2cfe9593854e6b3b5f77118a489a9d;hp=e55663698162c03e7f607fc3c0cb668663ab79d9;hpb=51daafaadd025703b2f8d6e3d27898e3768908f9;p=civicrm-core.git diff --git a/CRM/Utils/JSON.php b/CRM/Utils/JSON.php index e556636981..00287a5eaa 100644 --- a/CRM/Utils/JSON.php +++ b/CRM/Utils/JSON.php @@ -38,8 +38,19 @@ */ class CRM_Utils_JSON { + /** + * Output json to the client + * @param mixed $input + */ + static function output($input) { + header('Content-Type: application/json'); + echo json_encode($input); + CRM_Utils_System::civiExit(); + } + /** * Function to create JSON object + * @deprecated * * @param array $params associated array, that needs to be * converted to JSON array