mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-12 05:06:23 +00:00
update playlist xml saving
This commit is contained in:
@@ -210,25 +210,5 @@ namespace MediaBrowser.Common.Implementations.Serialization
|
||||
|
||||
return ServiceStack.Text.JsonSerializer.SerializeToString(obj, obj.GetType());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serializes to bytes.
|
||||
/// </summary>
|
||||
/// <param name="obj">The obj.</param>
|
||||
/// <returns>System.Byte[][].</returns>
|
||||
/// <exception cref="System.ArgumentNullException">obj</exception>
|
||||
public byte[] SerializeToBytes(object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
{
|
||||
throw new ArgumentNullException("obj");
|
||||
}
|
||||
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
SerializeToStream(obj, stream);
|
||||
return stream.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,20 +91,5 @@ namespace MediaBrowser.Common.Implementations.Serialization
|
||||
return DeserializeFromStream(type, stream);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serializes to bytes.
|
||||
/// </summary>
|
||||
/// <param name="obj">The obj.</param>
|
||||
/// <returns>System.Byte[][].</returns>
|
||||
public byte[] SerializeToBytes(object obj)
|
||||
{
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
SerializeToStream(obj, stream);
|
||||
|
||||
return stream.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user