mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 11:34:57 +02:00
21 lines
722 B
C#
21 lines
722 B
C#
using MediaBrowser.Common.Json;
|
|
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>
|
|
public CamelCaseJsonProfileFormatter() : base(JsonDefaults.GetCamelCaseOptions())
|
|
{
|
|
SupportedMediaTypes.Clear();
|
|
SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse("application/json;profile=\"CamelCase\""));
|
|
}
|
|
}
|
|
}
|