2012-07-20 02:22:44 +00:00
|
|
|
|
using System.IO;
|
|
|
|
|
using MediaBrowser.Common.Json;
|
2012-07-21 18:39:47 +00:00
|
|
|
|
using MediaBrowser.Common.Net.Handlers;
|
2012-07-20 02:22:44 +00:00
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Api.HttpHandlers
|
|
|
|
|
{
|
|
|
|
|
public abstract class JsonHandler : BaseJsonHandler
|
|
|
|
|
{
|
|
|
|
|
protected abstract object ObjectToSerialize { get; }
|
|
|
|
|
|
|
|
|
|
protected override void WriteResponseToOutputStream(Stream stream)
|
|
|
|
|
{
|
|
|
|
|
JsonSerializer.SerializeToStream(ObjectToSerialize, stream);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|