jellyfin/Jellyfin.Api/Formatters/CamelCaseJsonProfileFormatt...

21 lines
647 B
C#
Raw Normal View History

using Jellyfin.Extensions.Json;
2020-04-19 20:04:36 -04:00
using Microsoft.AspNetCore.Mvc.Formatters;
using Microsoft.Net.Http.Headers;
2023-01-31 06:18:10 -05:00
namespace Jellyfin.Api.Formatters;
/// <summary>
/// Camel Case Json Profile Formatter.
/// </summary>
public class CamelCaseJsonProfileFormatter : SystemTextJsonOutputFormatter
2020-04-19 20:04:36 -04:00
{
/// <summary>
2023-01-31 06:18:10 -05:00
/// Initializes a new instance of the <see cref="CamelCaseJsonProfileFormatter"/> class.
2020-04-19 20:04:36 -04:00
/// </summary>
2023-01-31 06:18:10 -05:00
public CamelCaseJsonProfileFormatter() : base(JsonDefaults.CamelCaseOptions)
2020-04-19 20:04:36 -04:00
{
2023-01-31 06:18:10 -05:00
SupportedMediaTypes.Clear();
SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(JsonDefaults.CamelCaseMediaType));
2020-04-19 20:04:36 -04:00
}
}