Closed berviantoleo closed 2 years ago
There's no support for JSON.NET in minimal APIs. Are you unable to use System.Text.Json?
PS: You also don't need a lot of the code that exists in Program.cs (UseRouting and UseEndpoints are implicit in the new host).
Okay. Thank you. Seems that is my problem.
I need to use Newtonsoft since the library don't support System.Text.Json yet.
Is there an existing issue for this?
Describe the bug
I've tried to add
AddNewtonsoftJson
for thenet6.0
app. But, seems the converter still usesSystem.Text.Json
. It was triggered a deserialization error.Here is my sample error:
Sample 1
sample 2
Expected Behavior
Should be don't have any errors and become valid request.
Steps To Reproduce
Exceptions (if any)
.NET Version
6.0.200
Anything else?