mirror of
https://github.com/Readarr/Readarr.git
synced 2026-01-31 09:11:11 -05:00
24 lines
604 B
C#
24 lines
604 B
C#
using System.Collections.Generic;
|
|
using System.IO;
|
|
using Nancy;
|
|
using Nancy.Responses.Negotiation;
|
|
using NzbDrone.Common.Serializer;
|
|
|
|
namespace Lidarr.Http.Extensions
|
|
{
|
|
public class NancyJsonSerializer : ISerializer
|
|
{
|
|
public bool CanSerialize(MediaRange contentType)
|
|
{
|
|
return contentType == "application/json";
|
|
}
|
|
|
|
public void Serialize<TModel>(MediaRange contentType, TModel model, Stream outputStream)
|
|
{
|
|
Json.Serialize(model, outputStream);
|
|
}
|
|
|
|
public IEnumerable<string> Extensions { get; private set; }
|
|
}
|
|
}
|