public function handleJsonResponse($success = false, $retVars = null)
    {
        $result = array();
        if ($success) {
            $result = array(
                'success' => $success
            );
        }
        if ($retVars) {
            $result = array_merge($retVars, $result);
        }

        $response = new SS_HTTPResponse(json_encode($result));
        $response->addHeader('Content-Type', 'application/json');
        return $response;
    }