Class ObjectSerializerExtensions
Extension methods for IObjectSerializer instances.
Inheritance
System.Object
ObjectSerializerExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Framework.Serialization
Assembly: EPiServer.Framework.dll
Version: 9.12.2Syntax
public static class ObjectSerializerExtensions
Methods
Deserialize(IObjectSerializer, String, Type)
Declaration
public static object Deserialize(this IObjectSerializer serializer, string value, Type objectType)
Parameters
Type | Name | Description |
---|---|---|
IObjectSerializer | serializer | |
System.String | value | |
System.Type | objectType |
Returns
Type | Description |
---|---|
System.Object |
Deserialize<T>(IObjectSerializer, String)
Deserializes the specified value to an object of type T
.
Declaration
public static T Deserialize<T>(this IObjectSerializer serializer, string value)
Parameters
Type | Name | Description |
---|---|---|
IObjectSerializer | serializer | The serializer. |
System.String | value | The value that should be deserialized. |
Returns
Type | Description |
---|---|
T | An object of type T |
Type Parameters
Name | Description |
---|---|
T | The type that the string should be deserialized to. |
Serialize(IObjectSerializer, Object)
Serializes the specified object to a string.
Declaration
public static string Serialize(this IObjectSerializer serializer, object value)
Parameters
Type | Name | Description |
---|---|---|
IObjectSerializer | serializer | The serializer. |
System.Object | value | The object that should be serialized to a string. |
Returns
Type | Description |
---|---|
System.String | A serialized representation of the provided object |