diff options
Diffstat (limited to 'Jellyfin.Api/Formatters/CamelCaseJsonProfileFormatter.cs')
| -rw-r--r-- | Jellyfin.Api/Formatters/CamelCaseJsonProfileFormatter.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Jellyfin.Api/Formatters/CamelCaseJsonProfileFormatter.cs b/Jellyfin.Api/Formatters/CamelCaseJsonProfileFormatter.cs new file mode 100644 index 000000000..96b29b1cb --- /dev/null +++ b/Jellyfin.Api/Formatters/CamelCaseJsonProfileFormatter.cs @@ -0,0 +1,20 @@ +using Jellyfin.Extensions.Json; +using Microsoft.AspNetCore.Mvc.Formatters; +using Microsoft.Net.Http.Headers; + +namespace Jellyfin.Api.Formatters; + +/// <summary> +/// Camel Case Json Profile Formatter. +/// </summary> +public class CamelCaseJsonProfileFormatter : SystemTextJsonOutputFormatter +{ + /// <summary> + /// Initializes a new instance of the <see cref="CamelCaseJsonProfileFormatter"/> class. + /// </summary> + public CamelCaseJsonProfileFormatter() : base(JsonDefaults.CamelCaseOptions) + { + SupportedMediaTypes.Clear(); + SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(JsonDefaults.CamelCaseMediaType)); + } +} |
