1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-26 17:59:14 +00:00
Radarr/NzbDrone.Api/Extensions/NancyJsonSerializer.cs
2013-05-12 19:52:55 -07:00

23 lines
No EOL
555 B
C#

using System.Collections.Generic;
using System.IO;
using Nancy;
using NzbDrone.Common;
using NzbDrone.Common.Serializer;
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)
{
Json.Serialize(model, outputStream);
}
public IEnumerable<string> Extensions { get; private set; }
}
}