summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Serialisation/JsonHelper.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-01-16 19:16:58 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-01-16 19:16:58 -0500
commit0122abaf203c1efa70e5e48336cc4800d4f01cc0 (patch)
tree212ebd99094153d58883e64d60de8469b6b90da9 /src/SMAPI/Framework/Serialisation/JsonHelper.cs
parent0ad9fbddddbf9edfd847c507d70e10d2f8ce559b (diff)
downloadSMAPI-0122abaf203c1efa70e5e48336cc4800d4f01cc0.tar.gz
SMAPI-0122abaf203c1efa70e5e48336cc4800d4f01cc0.tar.bz2
SMAPI-0122abaf203c1efa70e5e48336cc4800d4f01cc0.zip
add JSON converters for crossplatform-incompatible types (#423)
Diffstat (limited to 'src/SMAPI/Framework/Serialisation/JsonHelper.cs')
-rw-r--r--src/SMAPI/Framework/Serialisation/JsonHelper.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/Serialisation/JsonHelper.cs b/src/SMAPI/Framework/Serialisation/JsonHelper.cs
index 7c4e3ee3..f66f9dfb 100644
--- a/src/SMAPI/Framework/Serialisation/JsonHelper.cs
+++ b/src/SMAPI/Framework/Serialisation/JsonHelper.cs
@@ -19,9 +19,15 @@ 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>
{
+ // enums
new StringEnumConverter<Buttons>(),
new StringEnumConverter<Keys>(),
- new StringEnumConverter<SButton>()
+ new StringEnumConverter<SButton>(),
+
+ // crossplatform compatibility
+ new ColorConverter(),
+ new PointConverter(),
+ new RectangleConverter()
}
};