Show / Hide Table of Contents

Class JsonSerializer

A JSON serializer based on the ServiceStack infrastructure.

Inheritance
System.Object
Loggable
JsonSerializer
Implements
ILoggable
ISerializer<JsonMediaType>
ISerializer
ISyncSerializer
Inherited Members
Loggable.Logger
Loggable.GetLogger()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Serialization.ServiceStack.Text
Assembly: Kephas.Serialization.ServiceStack.Text.dll
Syntax
[OverridePriority(Priority.Low)]
public class JsonSerializer : Loggable, ILoggable, ISerializer<JsonMediaType>, ISerializer, ISyncSerializer

Constructors

| Improve this Doc View Source

JsonSerializer(IJsonSerializerConfigurator)

Initializes a new instance of the JsonSerializer class.

Declaration
public JsonSerializer(IJsonSerializerConfigurator jsonSerializerConfigurator)
Parameters
Type Name Description
IJsonSerializerConfigurator jsonSerializerConfigurator

The JSON serializer configurator.

Methods

| Improve this Doc View Source

Deserialize(TextReader, ISerializationContext)

Deserializes an object.

Declaration
public object Deserialize(TextReader textReader, ISerializationContext context = null)
Parameters
Type Name Description
System.IO.TextReader textReader

The System.IO.TextReader containing the serialized object.

ISerializationContext context

The context.

Returns
Type Description
System.Object

The deserialized object.

| Improve this Doc View Source

DeserializeAsync(TextReader, ISerializationContext, CancellationToken)

Deserialize an object asynchronously.

Declaration
public Task<object> DeserializeAsync(TextReader textReader, ISerializationContext context = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.IO.TextReader textReader

The System.IO.TextReader containing the serialized object.

ISerializationContext context

The context.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Object>

A Task promising the deserialized object.

| Improve this Doc View Source

Serialize(Object, TextWriter, ISerializationContext)

Serializes the provided object.

Declaration
public void Serialize(object obj, TextWriter textWriter, ISerializationContext context = null)
Parameters
Type Name Description
System.Object obj

The object.

System.IO.TextWriter textWriter

The System.IO.TextWriter used to write the object content.

ISerializationContext context

The context.

| Improve this Doc View Source

SerializeAsync(Object, TextWriter, ISerializationContext, CancellationToken)

Serializes the provided object asynchronously.

Declaration
public Task SerializeAsync(object obj, TextWriter textWriter, ISerializationContext context = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Object obj

The object.

System.IO.TextWriter textWriter

The System.IO.TextWriter used to write the object content.

ISerializationContext context

The context.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task promising the serialized object as a string.

Implements

ILoggable
ISerializer<TMedia>
ISerializer
ISyncSerializer

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX