2020-04-21 16:17:13 +02:00
|
|
|
using Jellyfin.Server.Models;
|
2020-04-20 02:04:36 +02: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>
|
2020-04-21 16:17:13 +02:00
|
|
|
public CamelCaseJsonProfileFormatter() : base(JsonOptions.CamelCase)
|
2020-04-20 02:04:36 +02:00
|
|
|
{
|
|
|
|
SupportedMediaTypes.Clear();
|
|
|
|
SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse("application/json;profile=\"CamelCase\""));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|