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
StreamThe JSON data to parse.
cancellationToken
CancellationTokenThe 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
stringThe 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
TThe value to convert.
Returns
- string
A JSON string represantation of the value.
Type Parameters
T
The type of the value to serialize.