protected function redirectJsonAction($url): ServiceResponse
    {
        if (is_array($url)) {
            $url = $this->prepareUrl($url);
        }
        $response = [
            'code' => 'success',
            'data' => [
                'inDialog' => $this->request->is('dialog') && !$this->FrontendBridge->_closeDialog,
                'redirect' => $url
            ]
        ];
        return new ServiceResponse($response);
    }