2012-07-20 02:22:44 +00:00
|
|
|
|
using System.IO;
|
2012-07-21 18:39:47 +00:00
|
|
|
|
using MediaBrowser.Common.Net.Handlers;
|
2012-07-31 16:29:07 +00:00
|
|
|
|
using MediaBrowser.Common.Serialization;
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|