From 454a2de2949deae90de4a936fb8fa7341d4a2990 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 20 Jan 2018 21:45:21 -0500 Subject: split SFieldConverter into separate converters --- .../SmapiConverters/ModDataIdConverter.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/SMAPI/Framework/Serialisation/SmapiConverters/ModDataIdConverter.cs (limited to 'src/SMAPI/Framework/Serialisation/SmapiConverters/ModDataIdConverter.cs') diff --git a/src/SMAPI/Framework/Serialisation/SmapiConverters/ModDataIdConverter.cs b/src/SMAPI/Framework/Serialisation/SmapiConverters/ModDataIdConverter.cs new file mode 100644 index 00000000..8a10db47 --- /dev/null +++ b/src/SMAPI/Framework/Serialisation/SmapiConverters/ModDataIdConverter.cs @@ -0,0 +1,19 @@ +using StardewModdingAPI.Framework.Models; + +namespace StardewModdingAPI.Framework.Serialisation.SmapiConverters +{ + /// Handles deserialisation of . + internal class ModDataIdConverter : SimpleReadOnlyConverter + { + /********* + ** Protected methods + *********/ + /// Read a JSON string. + /// The JSON string value. + /// The path to the current JSON node. + protected override ModDataID ReadString(string str, string path) + { + return new ModDataID(str); + } + } +} -- cgit