Show / Hide Table of Contents

Interface ILambdaJsonSerializer

The ILambdaJsonSerializer interface extends ILambdaSerializer interface by adding the ability to deserialize a JSON document to an explicitly specified type instead of relying on a generic type parameter.

Namespace: LambdaSharp.Serialization
Assembly: LambdaSharp.dll
Syntax
public interface ILambdaJsonSerializer : ILambdaSerializer

Methods

Deserialize(Stream, Type)

The Deserialize(Stream, Type) method deserializes the JSON object from a Stream.

Declaration
object Deserialize(Stream stream, Type type)
Parameters
Type Name Description
System.IO.Stream stream

Stream to deserialize.

System.Type type

The type to instantiate.

Returns
Type Description
System.Object

Deserialized instance.

Deserialize(String, Type)

The Deserialize(String, Type) method deserializes the JSON object from a string.

Declaration
virtual object Deserialize(string json, Type type)
Parameters
Type Name Description
System.String json

String to deserialize.

System.Type type

The type to instantiate.

Returns
Type Description
System.Object

Deserialized instance.

Deserialize<T>(String)

The Deserialize<T>(String) method deserializes the JSON object from a string.

Declaration
virtual T Deserialize<T>(string json)
Parameters
Type Name Description
System.String json

The string to deserialize.

Returns
Type Description
T

Deserialized instance.

Type Parameters
Name Description
T

The deserialization target type.

Serialize<T>(T)

The Serialize<T>(T) interface method serializes an instance to a JSON string.

Declaration
virtual string Serialize<T>(T value)
Parameters
Type Name Description
T value

The instance to serialize.

Returns
Type Description
System.String

Serialized JSON string.

Type Parameters
Name Description
T
In This Article
Back to top Generated by DocFX