diff --git a/Wabbajack.Common/Json.cs b/Wabbajack.Common/Json.cs index d9b755cc..9683062b 100644 --- a/Wabbajack.Common/Json.cs +++ b/Wabbajack.Common/Json.cs @@ -1,11 +1,9 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using System.IO; using System.Linq; using System.Reflection; using System.Text; -using System.Threading.Tasks; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using Wabbajack.Common.Serialization.Json; @@ -19,7 +17,7 @@ namespace Wabbajack.Common { new HashJsonConverter(), new RelativePathConverter(), - new AbolutePathConverter(), + new AbsolutePathConverter(), new HashRelativePathConverter(), new FullPathConverter(), new GameConverter(), @@ -33,7 +31,7 @@ namespace Wabbajack.Common Converters = Converters}; public static JsonSerializerSettings GenericJsonSettings => - new JsonSerializerSettings { }; + new JsonSerializerSettings(); public static void ToJson(this T obj, string filename) @@ -112,7 +110,7 @@ namespace Wabbajack.Common } } - private class AbolutePathConverter : JsonConverter + private class AbsolutePathConverter : JsonConverter { public override void WriteJson(JsonWriter writer, AbsolutePath value, JsonSerializer serializer) { @@ -241,11 +239,11 @@ namespace Wabbajack.Common { private static Dictionary _nameToType = new Dictionary(); private static Dictionary _typeToName = new Dictionary(); - private static bool _inited = false; + private static bool _init; public JsonNameSerializationBinder() { - if (_inited) + if (_init) return; var customDisplayNameTypes = @@ -275,7 +273,7 @@ namespace Wabbajack.Common _typeToName = _nameToType.ToDictionary( t => t.Value, t => t.Key); - _inited = true; + _init = true; }