SaaS CMS has officially launched! Learn more now.

Interface IObjectSerializer

Used to serialize/deserialize objects.

Namespace: EPiServer.Framework.Serialization
Assembly: EPiServer.Framework.dll
Version: 8.11.0
Syntax
public interface IObjectSerializer

Properties

HandledContentTypes

Gets the handled content types for this serializer.

Declaration
IEnumerable<string> HandledContentTypes { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<System.String>

The handled content types.

Methods

Deserialize(TextReader, Type)

Deserializes the object using the specified reader.

Declaration
object Deserialize(TextReader reader, Type objectType)
Parameters
Type Name Description
System.IO.TextReader reader

The reader.

System.Type objectType

Type of the object.

Returns
Type Description
System.Object

The serialized object.

Deserialize<T>(TextReader)

Deserializes the object using the specified reader.

Declaration
T Deserialize<T>(TextReader reader)
Parameters
Type Name Description
System.IO.TextReader reader

The reader.

Returns
Type Description
T

The serialized object.

Type Parameters
Name Description
T

The System.Type of the object to deserialize.

Serialize(TextWriter, Object)

Serializes an object using the specified text writer.

Declaration
void Serialize(TextWriter textWriter, object value)
Parameters
Type Name Description
System.IO.TextWriter textWriter

The text writer.

System.Object value

The object value.

Extension Methods