aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2020-04-18 18:16:36 +0900
committerGitHub <noreply@github.com>2020-04-18 18:16:36 +0900
commit167e96d212f01cdf56a97e494f89e9321293d766 (patch)
tree2a0335ded27b7c5d8d647d432573d6df68e43473
parent25da2cb2d7cfa762716a651aba87a53522b2d9f9 (diff)
parentbb288e16cce65fdf48b673204b7e67b94b21c034 (diff)
Merge pull request #2848 from ZadenRB/startup-endpoint-parameters
Fix casing of JSON in Jellyfin API
-rw-r--r--Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
index dd4f9cd23..71ef9a69a 100644
--- a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
+++ b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
@@ -71,6 +71,11 @@ namespace Jellyfin.Server.Extensions
// Clear app parts to avoid other assemblies being picked up
.ConfigureApplicationPartManager(a => a.ApplicationParts.Clear())
.AddApplicationPart(typeof(StartupController).Assembly)
+ .AddJsonOptions(options =>
+ {
+ // Setting the naming policy to null leaves the property names as-is when serializing objects to JSON.
+ options.JsonSerializerOptions.PropertyNamingPolicy = null;
+ })
.AddControllersAsServices();
}