code: public static function response_json($value, $is_stripslashes = false) {
          $value = json_encode($value);
          if ($is_stripslashes) {
              $value = stripslashes($value);
          }
          $response = Response::factory()
                  ->body($value)
                  ->headers('Content-Type', 'application/json; charset=UTF-8');
          self::ajax_response($response);
      }
docs: В ответ возвращается JSON