jellyfin/Jellyfin.Api/Formatters/CamelCaseJsonProfileFormatter.cs

22 lines
705 B
C#
Raw Normal View History

using Jellyfin.Extensions.Json;
2020-04-20 02:04:36 +02:00
using Microsoft.AspNetCore.Mvc.Formatters;
using Microsoft.Net.Http.Headers;
2023-01-14 04:23:22 +01:00
namespace Jellyfin.Api.Formatters
2020-04-20 02:04:36 +02:00
{
/// <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 05:57:38 +01:00
public CamelCaseJsonProfileFormatter() : base(JsonDefaults.CamelCaseOptions)
2020-04-20 02:04:36 +02:00
{
SupportedMediaTypes.Clear();
SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(JsonDefaults.CamelCaseMediaType));
2020-04-20 02:04:36 +02:00
}
}
}