Table of Contents

Interface IAnybillSerializer

Namespace
anybill.POS.Client.Serialization
Assembly
anybill.POS.Client.dll

A serializer used for dto conversion.

public interface IAnybillSerializer

Methods

DeserializeAsync<T>(Stream, CancellationToken)

Reads the JSON value of the stream into an object.

Task<T> DeserializeAsync<T>(Stream stream, CancellationToken cancellationToken = default)

Parameters

stream Stream

The JSON data to parse.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<T>

A T representation of the JSON value.

Type Parameters

T

The target type of the JSON value.

Deserialize<T>(string)

Reads the JSON value of the value into an object.

T Deserialize<T>(string value)

Parameters

value string

The JSON data to parse.

Returns

T

A T representation of the JSON value.

Type Parameters

T

The target type of the JSON value.

Serialize<T>(T)

Serializes the object into a JSON value.

string Serialize<T>(T value)

Parameters

value T

The value to convert.

Returns

string

A JSON string represantation of the value.

Type Parameters

T

The type of the value to serialize.