diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-06-28 21:41:00 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-06-28 21:41:00 -0400 |
commit | 89ad599561a058289d8ea44e0c345f1a30a3a6ac (patch) | |
tree | b90f7e085b7bf12f75320a2bd002d1e748028eb3 /src/SMAPI.Web/Startup.cs | |
parent | 583cb91f4a3429549b8e56081737e6a410ebd1a4 (diff) | |
download | SMAPI-89ad599561a058289d8ea44e0c345f1a30a3a6ac.tar.gz SMAPI-89ad599561a058289d8ea44e0c345f1a30a3a6ac.tar.bz2 SMAPI-89ad599561a058289d8ea44e0c345f1a30a3a6ac.zip |
add support for writing versions to JSON
Diffstat (limited to 'src/SMAPI.Web/Startup.cs')
-rw-r--r-- | src/SMAPI.Web/Startup.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/SMAPI.Web/Startup.cs b/src/SMAPI.Web/Startup.cs index 58584348..ced6e1c7 100644 --- a/src/SMAPI.Web/Startup.cs +++ b/src/SMAPI.Web/Startup.cs @@ -7,6 +7,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Newtonsoft.Json; +using StardewModdingAPI.Toolkit.Serialisation; using StardewModdingAPI.Web.Framework; using StardewModdingAPI.Web.Framework.Clients.Chucklefish; using StardewModdingAPI.Web.Framework.Clients.GitHub; @@ -56,6 +57,9 @@ namespace StardewModdingAPI.Web .ConfigureApplicationPartManager(manager => manager.FeatureProviders.Add(new InternalControllerFeatureProvider())) .AddJsonOptions(options => { + foreach (JsonConverter converter in new JsonHelper().JsonSettings.Converters) + options.SerializerSettings.Converters.Add(converter); + options.SerializerSettings.Formatting = Formatting.Indented; options.SerializerSettings.NullValueHandling = NullValueHandling.Ignore; }); |