public async Task LoadOptions() { String optionsJson = await jsRuntime.InvokeAsync <String>("ApplicationOptions.get"); if (String.IsNullOrEmpty(optionsJson) == false) { try { Options = JsonSerializer.Deserialize <ApplicationOptions>(optionsJson); Options.SetDefaultValues(); } catch (JsonException) { //Nothing to do, we can not deserialize Options = new ApplicationOptions(); } } }