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