1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-30 20:05:41 +00:00
Radarr/NzbDrone.Api/Extensions/NancyJsonSerializer.cs

23 lines
555 B
C#
Raw Normal View History

using System.Collections.Generic;
using System.IO;
using Nancy;
using NzbDrone.Common;
2013-05-12 15:18:17 +00:00
using NzbDrone.Common.Serializer;
2013-02-23 20:35:26 +00:00
namespace NzbDrone.Api.Extensions
{
public class NancyJsonSerializer : ISerializer
{
public bool CanSerialize(string contentType)
{
return true;
}
public void Serialize<TModel>(string contentType, TModel model, Stream outputStream)
{
2013-05-13 02:52:55 +00:00
Json.Serialize(model, outputStream);
}
public IEnumerable<string> Extensions { get; private set; }
}
}