diff options
Diffstat (limited to 'src/SMAPI/Framework/Serialisation/SmapiConverters/ModDataIdConverter.cs')
-rw-r--r-- | src/SMAPI/Framework/Serialisation/SmapiConverters/ModDataIdConverter.cs | 19 |
1 files changed, 19 insertions, 0 deletions
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 +{ + /// <summary>Handles deserialisation of <see cref="ModDataID"/>.</summary> + internal class ModDataIdConverter : SimpleReadOnlyConverter<ModDataID> + { + /********* + ** Protected methods + *********/ + /// <summary>Read a JSON string.</summary> + /// <param name="str">The JSON string value.</param> + /// <param name="path">The path to the current JSON node.</param> + protected override ModDataID ReadString(string str, string path) + { + return new ModDataID(str); + } + } +} |