Issues with PostJsonAsync using System.Text.Json #50332
-
|
Hello there, } |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Where is the server code? |
Beta Was this translation helpful? Give feedback.
-
|
|
Beta Was this translation helpful? Give feedback.
HttpClient.PostAsJsonAsyncdefaults toJsonSerializerDefaults.Webserializer options which are different from usingJsonSerializer.Serializedirectly.See:
https://github.com/dotnet/runtime/blob/71c68bf465ffbb5abb3706405717325f34ca504f/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs#L142-L147