Class JsonObjectSerializer

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Used for serialization of object to/from JSON format.

Inheritance
System.Object
JsonObjectSerializer
Implements
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.Json.Internal
Assembly: EPiServer.Framework.dll
Version: 11.20.7
Syntax
[ServiceConfiguration(typeof(IObjectSerializer))]
public class JsonObjectSerializer : IObjectSerializer

Constructors

JsonObjectSerializer()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the JsonObjectSerializer class.

Declaration
public JsonObjectSerializer()

JsonObjectSerializer(IEnumerable<JsonConverter>, IContractResolver)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the JsonObjectSerializer class.

Declaration
public JsonObjectSerializer(IEnumerable<JsonConverter> converters, IContractResolver resolver)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Newtonsoft.Json.JsonConverter> converters

The json converters.

Newtonsoft.Json.Serialization.IContractResolver resolver

The json contract resolver

Properties

HandledContentTypes

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the handled content types for this serializer.

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

The handled content types.

Methods

Deserialize(TextReader, Type)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Deserializes the object using the specified reader.

Declaration
public 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)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Deserializes the object using the specified reader.

Declaration
public 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)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Serializes an object using the specified text writer.

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

The text writer.

System.Object value

The object value.

Implements

Extension Methods