Improve installed.json

- Serialize Platform and Unlocker as strings rather than just displaying an integer in installed.json so it's easier to distinguish.
This commit is contained in:
Frog
2026-06-15 22:20:23 -07:00
parent 6156272d1b
commit 4aa6756140
+3
View File
@@ -8,6 +8,7 @@ using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using CreamInstaller; using CreamInstaller;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace CreamInstaller.Utility; namespace CreamInstaller.Utility;
@@ -31,10 +32,12 @@ internal sealed class InstalledDlcRecord
internal sealed class InstalledGameRecord internal sealed class InstalledGameRecord
{ {
[JsonConverter(typeof(StringEnumConverter))]
public Platform Platform { get; set; } public Platform Platform { get; set; }
public string Id { get; set; } public string Id { get; set; }
public string Name { get; set; } public string Name { get; set; }
public string RootDirectory { get; set; } public string RootDirectory { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public InstalledUnlocker Unlocker { get; set; } public InstalledUnlocker Unlocker { get; set; }
public bool UseProxy { get; set; } public bool UseProxy { get; set; }