using System; using System.IO; namespace MediaBrowser.Model.Serialization { public interface IJsonSerializer { /// /// Serializes to stream. /// /// /// The obj. /// The stream. /// obj void SerializeToStream(T obj, Stream stream) where T : class; /// /// Serializes to file. /// /// /// The obj. /// The file. /// obj void SerializeToFile(T obj, string file) where T : class; /// /// Deserializes from file. /// /// The type. /// The file. /// System.Object. /// type object DeserializeFromFile(Type type, string file); /// /// Deserializes from file. /// /// /// The file. /// ``0. /// file T DeserializeFromFile(string file) where T : class; /// /// Deserializes from stream. /// /// /// The stream. /// ``0. /// stream T DeserializeFromStream(Stream stream); /// /// Deserializes from string. /// /// /// The text. /// ``0. /// text T DeserializeFromString(string text); /// /// Deserializes from stream. /// /// The stream. /// The type. /// System.Object. /// stream object DeserializeFromStream(Stream stream, Type type); /// /// Deserializes from string. /// /// The json. /// The type. /// System.Object. /// json object DeserializeFromString(string json, Type type); /// /// Serializes to string. /// /// /// The obj. /// System.String. /// obj string SerializeToString(T obj) where T : class; /// /// Serializes to bytes. /// /// /// The obj. /// System.Byte[][]. /// obj byte[] SerializeToBytes(T obj) where T : class; } }