aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Formatters/CamelCaseJsonProfileFormatter.cs
blob: ea8c5ecdb1e46e4a8882f113b48f38ccfcba5657 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using Jellyfin.Extensions.Json;
using Microsoft.AspNetCore.Mvc.Formatters;
using Microsoft.Net.Http.Headers;

namespace Jellyfin.Server.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));
        }
    }
}