Interface IAnybillSerializer
A serializer used for dto conversion.
Namespace: anybill.POS.Client.Serialization
Assembly: anybill.POS.Client.dll
Syntax
public interface IAnybillSerializer
Methods
Deserialize<T>(String)
Reads the JSON value of the value into an object.
Declaration
T Deserialize<T>(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value | The JSON data to parse. |
Returns
| Type | Description |
|---|---|
| T | A |
Type Parameters
| Name | Description |
|---|---|
| T | The target type of the JSON value. |
DeserializeAsync<T>(Stream, CancellationToken)
Reads the JSON value of the stream into an object.
Declaration
Task<T> DeserializeAsync<T>(Stream stream, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | stream | The JSON data to parse. |
| System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<T> | A |
Type Parameters
| Name | Description |
|---|---|
| T | The target type of the JSON value. |
Serialize<T>(T)
Serializes the object into a JSON value.
Declaration
string Serialize<T>(T value)
Parameters
| Type | Name | Description |
|---|---|---|
| T | value | The value to convert. |
Returns
| Type | Description |
|---|---|
| System.String | A JSON string represantation of the value. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the value to serialize. |