Skip to content

Use Task<T> as return type in IApiClientSerialization #281

@DiscoPYF

Description

@DiscoPYF

IApiClientSerialization allows consumers to implement their own serialization logic, using their preferred serializer. Some libraries support asynchronous task-based operations, e.g. https://docs.microsoft.com/en-us/dotnet/api/system.text.json.jsonserializer.deserializeasync?view=netcore-3.1

We can update the signature of the methods in IApiClientSerialization to return a task and allow implementations with fully asynchronous operations.

Task<T> DeserializeFromStream<T>(Stream stream);
Task<byte[]> Serialize<T>(T item, bool useCamelCasePropertyNames, bool ignoreNullValues);

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions