diff --git a/src/modules/Workspaces/WorkspacesCsharpLibrary/Data/WorkspacesEditorData`1.cs b/src/modules/Workspaces/WorkspacesCsharpLibrary/Data/WorkspacesEditorData`1.cs index f1a8b60a5b..eed73af224 100644 --- a/src/modules/Workspaces/WorkspacesCsharpLibrary/Data/WorkspacesEditorData`1.cs +++ b/src/modules/Workspaces/WorkspacesCsharpLibrary/Data/WorkspacesEditorData`1.cs @@ -28,4 +28,11 @@ public class WorkspacesEditorData { return JsonSerializer.Serialize(data, WorkspacesJsonOptions.EditorOptions); } + + [RequiresUnreferencedCode("JSON serialization uses reflection-based serializer.")] + [RequiresDynamicCode("JSON serialization uses reflection-based serializer.")] + public T Deserialize(string json) + { + return JsonSerializer.Deserialize(json, WorkspacesJsonOptions.EditorOptions)!; + } } diff --git a/src/modules/Workspaces/WorkspacesLauncherUI/ViewModels/MainViewModel.cs b/src/modules/Workspaces/WorkspacesLauncherUI/ViewModels/MainViewModel.cs index aa029d7ea2..5b358686de 100644 --- a/src/modules/Workspaces/WorkspacesLauncherUI/ViewModels/MainViewModel.cs +++ b/src/modules/Workspaces/WorkspacesLauncherUI/ViewModels/MainViewModel.cs @@ -6,13 +6,11 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; -using System.Diagnostics; using ManagedCommon; using WorkspacesCsharpLibrary; using WorkspacesLauncherUI.Data; using WorkspacesLauncherUI.Models; -using WorkspacesLauncherUI.Utils; namespace WorkspacesLauncherUI.ViewModels {