mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Replace JSON.NET with System.Text.json (#840)
This commit is contained in:
1 parent
e112ca9da8
commit
a340f8822e
63 files changed
+466
-584
No files matched your search
@@ -1,15 +1,14 @@
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
using Artemis.UI.Extensions;
|
||||
using Artemis.UI.Shared;
|
||||
using Artemis.WebClient.Workshop.Services;
|
||||
using Newtonsoft.Json;
|
||||
using PropertyChanged.SourceGenerator;
|
||||
|
||||
namespace Artemis.UI.Screens.Debugger.Workshop;
|
||||
|
||||
public partial class WorkshopDebugViewModel : ActivatableViewModelBase
|
||||
{
|
||||
|
||||
[Notify] private string? _token;
|
||||
[Notify] private bool _emailVerified;
|
||||
[Notify] private string? _claims;
|
||||
@@ -18,12 +17,12 @@ public partial class WorkshopDebugViewModel : ActivatableViewModelBase
|
||||
public WorkshopDebugViewModel(IWorkshopService workshopService, IAuthenticationService authenticationService)
|
||||
{
|
||||
DisplayName = "Workshop";
|
||||
|
||||
|
||||
this.WhenActivatedAsync(async _ =>
|
||||
{
|
||||
Token = await authenticationService.GetBearer();
|
||||
EmailVerified = authenticationService.GetIsEmailVerified();
|
||||
Claims = JsonConvert.SerializeObject(authenticationService.Claims, Formatting.Indented);
|
||||
Claims = JsonSerializer.Serialize(authenticationService.Claims, new JsonSerializerOptions {WriteIndented = true});
|
||||
WorkshopStatus = await workshopService.GetWorkshopStatus(CancellationToken.None);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user