2020-05-21 07:44:15 -07:00
|
|
|
using MediaBrowser.Common.Json;
|
2020-04-19 17:04:36 -07:00
|
|
|
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>
|
2021-03-08 21:57:38 -07:00
|
|
|
public CamelCaseJsonProfileFormatter() : base(JsonDefaults.CamelCaseOptions)
|
2020-04-19 17:04:36 -07:00
|
|
|
{
|
|
|
|
SupportedMediaTypes.Clear();
|
2020-09-03 11:15:24 -07:00
|
|
|
SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(JsonDefaults.CamelCaseMediaType));
|
2020-04-19 17:04:36 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|