From 5619890abf866e608e667bc6cd81b5aba9e3a350 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 22 Sep 2017 18:19:42 -0400 Subject: indent JSON responses (#336) --- src/StardewModdingAPI.Web/Startup.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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; + }); } /// The method called by the runtime to configure the HTTP request pipeline. -- cgit