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;
|
|
|
|
|
2023-01-31 11:18:10 +00:00
|
|
|
namespace Jellyfin.Api.Formatters;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Camel Case Json Profile Formatter.
|
|
|
|
/// </summary>
|
|
|
|
public class CamelCaseJsonProfileFormatter : SystemTextJsonOutputFormatter
|
2020-04-20 00:04:36 +00:00
|
|
|
{
|
|
|
|
/// <summary>
|
2023-01-31 11:18:10 +00:00
|
|
|
/// Initializes a new instance of the <see cref="CamelCaseJsonProfileFormatter"/> class.
|
2020-04-20 00:04:36 +00:00
|
|
|
/// </summary>
|
2023-01-31 11:18:10 +00:00
|
|
|
public CamelCaseJsonProfileFormatter() : base(JsonDefaults.CamelCaseOptions)
|
2020-04-20 00:04:36 +00:00
|
|
|
{
|
2023-01-31 11:18:10 +00:00
|
|
|
SupportedMediaTypes.Clear();
|
|
|
|
SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(JsonDefaults.CamelCaseMediaType));
|
2020-04-20 00:04:36 +00:00
|
|
|
}
|
|
|
|
}
|