aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-08-24 07:39:16 -0600
committercrobibero <cody@robibe.ro>2020-08-24 07:39:16 -0600
commit9626101c9f8d0acceb2ecf97bed502c272d6e4f6 (patch)
tree00d7edea6d98b2b36cd5487439ed15e4c9dcb491 /Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
parentef0a7c3e2a24519142c912837be4beefcd07e421 (diff)
parent7ce21d436baa2ffe80e7723f3d0887db7a0eeaf1 (diff)
Merge remote-tracking branch 'upstream/master' into 3.1.7
Diffstat (limited to 'Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs')
-rw-r--r--Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
index 83d8fac5b..1f9fc7078 100644
--- a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
+++ b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
@@ -154,6 +154,7 @@ namespace Jellyfin.Server.Extensions
opts.OutputFormatters.Insert(0, new PascalCaseJsonProfileFormatter());
opts.OutputFormatters.Add(new CssOutputFormatter());
+ opts.OutputFormatters.Add(new XmlOutputFormatter());
})
// Clear app parts to avoid other assemblies being picked up
@@ -167,6 +168,8 @@ namespace Jellyfin.Server.Extensions
// From JsonDefaults
options.JsonSerializerOptions.ReadCommentHandling = jsonOptions.ReadCommentHandling;
options.JsonSerializerOptions.WriteIndented = jsonOptions.WriteIndented;
+ options.JsonSerializerOptions.IgnoreNullValues = jsonOptions.IgnoreNullValues;
+
options.JsonSerializerOptions.Converters.Clear();
foreach (var converter in jsonOptions.Converters)
{