diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-09-22 18:19:42 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-09-22 18:19:42 -0400 |
commit | 5619890abf866e608e667bc6cd81b5aba9e3a350 (patch) | |
tree | 7ec7f710212f6d88a344280493dd11c5499552ab /src | |
parent | 86d4827df211cc28549acb88ee7cb08d6cc4d4aa (diff) | |
download | SMAPI-5619890abf866e608e667bc6cd81b5aba9e3a350.tar.gz SMAPI-5619890abf866e608e667bc6cd81b5aba9e3a350.tar.bz2 SMAPI-5619890abf866e608e667bc6cd81b5aba9e3a350.zip |
indent JSON responses (#336)
Diffstat (limited to 'src')
-rw-r--r-- | src/StardewModdingAPI.Web/Startup.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/StardewModdingAPI.Web/Startup.cs b/src/StardewModdingAPI.Web/Startup.cs index abae06ec..b35d072b 100644 --- a/src/StardewModdingAPI.Web/Startup.cs +++ b/src/StardewModdingAPI.Web/Startup.cs @@ -38,7 +38,11 @@ namespace StardewModdingAPI.Web { services .AddMvc() - .AddJsonOptions(options => options.SerializerSettings.NullValueHandling = NullValueHandling.Ignore); // suppress null values in JSON responses + .AddJsonOptions(options => + { + options.SerializerSettings.Formatting = Formatting.Indented; + options.SerializerSettings.NullValueHandling = NullValueHandling.Ignore; + }); } /// <summary>The method called by the runtime to configure the HTTP request pipeline.</summary> |