diff --git a/IPA.Loader/Config/Stores/CustomObjectConverter.cs b/IPA.Loader/Config/Stores/CustomObjectConverter.cs
index 21402ce9..5f8cc00a 100644
--- a/IPA.Loader/Config/Stores/CustomObjectConverter.cs
+++ b/IPA.Loader/Config/Stores/CustomObjectConverter.cs
@@ -20,7 +20,7 @@ namespace IPA.Config.Stores.Converters
private static readonly GeneratedStore.GeneratedStoreCreator creator = GeneratedStore.GetCreator(typeof(T));
public T FromValue(Value value, object parent)
- { // lots of casting here, but it works i promise (parent can be a non-IGeneratedStore, however it won't necessarily behave then)
+ { // lots of casting here, but it works i promise (probably) (parent can be a non-IGeneratedStore, however it won't necessarily behave then)
var obj = creator(parent as GeneratedStore.IGeneratedStore) as U;
obj.Deserialize(value);
return obj;
diff --git a/IPA.Loader/Loader/PluginManifest.cs b/IPA.Loader/Loader/PluginManifest.cs
index ae621ea4..a545962e 100644
--- a/IPA.Loader/Loader/PluginManifest.cs
+++ b/IPA.Loader/Loader/PluginManifest.cs
@@ -4,6 +4,7 @@ using Newtonsoft.Json;
using SemVer;
using System;
using System.Collections.Generic;
+using AlmostVersionConverter = IPA.JsonConverters.AlmostVersionConverter;
using Version = SemVer.Version;
namespace IPA.Loader
diff --git a/IPA.Loader/Updating/BeatMods/ApiEndpoint.cs b/IPA.Loader/Updating/BeatMods/ApiEndpoint.cs
index 18bcbd00..8062dbd8 100644
--- a/IPA.Loader/Updating/BeatMods/ApiEndpoint.cs
+++ b/IPA.Loader/Updating/BeatMods/ApiEndpoint.cs
@@ -104,7 +104,7 @@ namespace IPA.Updating.BeatMods
public Version Version;
[JsonProperty("gameVersion"),
- JsonConverter(typeof(AlmostVersionConverter))]
+ JsonConverter(typeof(JsonConverters.AlmostVersionConverter))]
public AlmostVersion GameVersion;
[Serializable]
diff --git a/IPA.Loader/Utilities/AlmostVersion.cs b/IPA.Loader/Utilities/AlmostVersion.cs
index c23f0ba9..182c1371 100644
--- a/IPA.Loader/Utilities/AlmostVersion.cs
+++ b/IPA.Loader/Utilities/AlmostVersion.cs
@@ -1,4 +1,7 @@
-using System;
+using IPA.Config.Data;
+using IPA.Config.Stores;
+using IPA.Config.Stores.Converters;
+using System;
using System.Collections.Generic;
using Version = SemVer.Version;
@@ -241,4 +244,27 @@ namespace IPA.Utilities
///
public static implicit operator Version(AlmostVersion av) => av?.SemverValue;
}
+
+ ///
+ /// A for s.
+ ///
+ public sealed class AlmostVersionConverter : ValueConverter
+ {
+ ///
+ /// Converts a node into an .
+ ///
+ /// the node to convert
+ /// the owner of the new object
+ ///
+ public override AlmostVersion FromValue(Value value, object parent)
+ => new AlmostVersion(Converter.Default.FromValue(value, parent));
+ ///
+ /// Converts an to a node.
+ ///
+ /// the to convert
+ /// the parent of
+ /// a node representing
+ public override Value ToValue(AlmostVersion obj, object parent)
+ => Value.From(obj.ToString());
+ }
}