2021-06-19 12:02:33 -04:00
|
|
|
using Jellyfin.Extensions.Json;
|
2020-04-19 20:04:36 -04: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 23:57:38 -05:00
|
|
|
public CamelCaseJsonProfileFormatter() : base(JsonDefaults.CamelCaseOptions)
|
2020-04-19 20:04:36 -04:00
|
|
|
{
|
|
|
|
SupportedMediaTypes.Clear();
|
2020-09-03 14:15:24 -04:00
|
|
|
SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(JsonDefaults.CamelCaseMediaType));
|
2020-04-19 20:04:36 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|