Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support System.Text.Json source generator contexts #10

Open
TheJayMann opened this issue Oct 11, 2021 · 0 comments
Open

Support System.Text.Json source generator contexts #10

TheJayMann opened this issue Oct 11, 2021 · 0 comments

Comments

@TheJayMann
Copy link

With System.Text.Json adding a source generator to version 6, it would be nice if this could generate HttpClient code which could use the generated JsonSerializerContext and JsonTypeInfo<> types. I'm not entirely sure the best ways to add this, but I think some ways to do this would be to allow an option to accept JsonSerializerContext as a constructor argument, allow the method to accept an IObjectSerializer which can perform the serialization itself, allow returning the HttpContent directly, or allow the method to take in a JsonSerializerContext or a JsonTypeInfo<TRequest> and JsonTypeInfo<TResult>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant