summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Serialisation/JsonHelper.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-10-18 16:47:32 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-10-18 16:47:32 -0400
commit51a2c3991f3c76197afb21a42a30f2a91a7f9908 (patch)
tree59bb937c35675d6376ea280e521c8cc52a1eb34a /src/SMAPI/Framework/Serialisation/JsonHelper.cs
parent2ff937397163f0ad5940b636bc7312ac747d9c39 (diff)
downloadSMAPI-51a2c3991f3c76197afb21a42a30f2a91a7f9908.tar.gz
SMAPI-51a2c3991f3c76197afb21a42a30f2a91a7f9908.tar.bz2
SMAPI-51a2c3991f3c76197afb21a42a30f2a91a7f9908.zip
simplify SelectiveStringEnumConverter implementation
Diffstat (limited to 'src/SMAPI/Framework/Serialisation/JsonHelper.cs')
-rw-r--r--src/SMAPI/Framework/Serialisation/JsonHelper.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/SMAPI/Framework/Serialisation/JsonHelper.cs b/src/SMAPI/Framework/Serialisation/JsonHelper.cs
index 3193aa3c..77b93b66 100644
--- a/src/SMAPI/Framework/Serialisation/JsonHelper.cs
+++ b/src/SMAPI/Framework/Serialisation/JsonHelper.cs
@@ -1,9 +1,8 @@
-using System;
+using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Xna.Framework.Input;
using Newtonsoft.Json;
-using StardewModdingAPI.Utilities;
namespace StardewModdingAPI.Framework.Serialisation
{
@@ -20,7 +19,9 @@ namespace StardewModdingAPI.Framework.Serialisation
ObjectCreationHandling = ObjectCreationHandling.Replace, // avoid issue where default ICollection<T> values are duplicated each time the config is loaded
Converters = new List<JsonConverter>
{
- new SelectiveStringEnumConverter(typeof(Buttons), typeof(Keys), typeof(SButton))
+ new SelectiveStringEnumConverter<Buttons>(),
+ new SelectiveStringEnumConverter<Keys>(),
+ new SelectiveStringEnumConverter<SButton>()
}
};