public async Task RenameCard(string number, string name) { try { string json = await _client.rename_card(number, name); string str = JsonConvert.DeserializeObject <string>(json); if (str == "1") { await Application.Current.MainPage.DisplayAlert("Уведомление", "Успех", "OK"); } else { await Application.Current.MainPage.DisplayAlert("Уведомление", "Ошибка", "OK"); } } catch (Exception ex) { await Application.Current.MainPage.DisplayAlert("Уведомление", "Ошибка", "OK"); } }