diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2023-02-15 22:40:07 +0100 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2023-02-15 22:40:07 +0100 |
| commit | 3a91c37283eb633e7e55df78b8017a5a492923b6 (patch) | |
| tree | 4e22db9a5234c63370195992a28c64891d7a6cc1 /Jellyfin.Api/Formatters/PascalCaseJsonProfileFormatter.cs | |
| parent | 4eba16c6726564b159e395e188ec89f69d990e52 (diff) | |
| parent | 3fe64f69b747f39a6505e4fad1bbd6eaf63cecc4 (diff) | |
Merge branch 'master' into network-rewrite
Diffstat (limited to 'Jellyfin.Api/Formatters/PascalCaseJsonProfileFormatter.cs')
| -rw-r--r-- | Jellyfin.Api/Formatters/PascalCaseJsonProfileFormatter.cs | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/Jellyfin.Api/Formatters/PascalCaseJsonProfileFormatter.cs b/Jellyfin.Api/Formatters/PascalCaseJsonProfileFormatter.cs index 5d77dbf4c..b5b575278 100644 --- a/Jellyfin.Api/Formatters/PascalCaseJsonProfileFormatter.cs +++ b/Jellyfin.Api/Formatters/PascalCaseJsonProfileFormatter.cs @@ -3,22 +3,21 @@ using Jellyfin.Extensions.Json; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.Net.Http.Headers; -namespace Jellyfin.Api.Formatters +namespace Jellyfin.Api.Formatters; + +/// <summary> +/// Pascal Case Json Profile Formatter. +/// </summary> +public class PascalCaseJsonProfileFormatter : SystemTextJsonOutputFormatter { /// <summary> - /// Pascal Case Json Profile Formatter. + /// Initializes a new instance of the <see cref="PascalCaseJsonProfileFormatter"/> class. /// </summary> - public class PascalCaseJsonProfileFormatter : SystemTextJsonOutputFormatter + public PascalCaseJsonProfileFormatter() : base(JsonDefaults.PascalCaseOptions) { - /// <summary> - /// Initializes a new instance of the <see cref="PascalCaseJsonProfileFormatter"/> class. - /// </summary> - public PascalCaseJsonProfileFormatter() : base(JsonDefaults.PascalCaseOptions) - { - SupportedMediaTypes.Clear(); - // Add application/json for default formatter - SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(MediaTypeNames.Application.Json)); - SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(JsonDefaults.PascalCaseMediaType)); - } + SupportedMediaTypes.Clear(); + // Add application/json for default formatter + SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(MediaTypeNames.Application.Json)); + SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(JsonDefaults.PascalCaseMediaType)); } } |
