Class JsonSerializer
Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.
Implements
Namespace: Sartorius.SAF.Serialization
Assembly: Sartorius.SAF.Serialization.dll
Syntax
[SerializerExport(Priority = 1)]
public class JsonSerializer : ISerializer
Remarks
This ISerializer implementation is exported via SerializerExportAttribute with priority 1.
Methods
View SourceDeserialize<T>(Stream)
Deserializes an object of type T from the specified stream.
Declaration
public T Deserialize<T>(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | The stream from which the serialized object is read. |
Returns
| Type | Description |
|---|---|
| T |
Type Parameters
| Name | Description |
|---|---|
| T | The type to deserialize. |
Serialize(Stream, object)
Serializes the specified graph to the specified stream.
Declaration
public void Serialize(Stream stream, object graph)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | The stream in which the serialized object is written. |
| object | graph | The graph to serialize. |