You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
The text was updated successfully, but these errors were encountered:
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
andJsonTypeInfo<>
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 acceptJsonSerializerContext
as a constructor argument, allow the method to accept anIObjectSerializer
which can perform the serialization itself, allow returning theHttpContent
directly, or allow the method to take in aJsonSerializerContext
or aJsonTypeInfo<TRequest>
andJsonTypeInfo<TResult>
The text was updated successfully, but these errors were encountered: