You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
555 B
23 lines
555 B
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; }
|
|
}
|
|
} |