restsharp / restsharp/RestSharp

Async serializer?

Open
#2,165 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
C#
Stars
9.8k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

Would it be possible to add support of async serializer?

System.Text.Json IAsyncEnumerable serialization
If you want to serialize IAsyncEnumerable in net6+ app you need to use JsonSerializer.SerializeAsync() method
IRestSerializer does not allow to await inside Serializer() as it's synchronious method.
Temporary solution - using GetAwaiter().GetResult() - but this approach doesn't offer "true" async support

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the IRestSerializer interface and its synchronous Serializer() method, then compare the System.Text.Json SerializeAsync() entry point described in the issue. No file or test is named; done would require a defined asynchronous serializer path that supports IAsyncEnumerable without GetAwaiter().GetResult().

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.