C
C#3y ago
DeaDo

ASP Minimal API Deserializor - allow Fields

app.MapPost("/update", ((int[] cities, double distance) newBest) =>
app.MapPost("/update", ((int[] cities, double distance) newBest) =>
I want my minimal api to be able to deserialize that tuple. The System.Test cant do that by default though. Typically i fix that with those serializor options, but i dont know how to provide my settings for the minimal api
var serializerOptions = new JsonSerializerOptions { IncludeFields = true };
var serializerOptions = new JsonSerializerOptions { IncludeFields = true };
2 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
DeaDo
DeaDoOP3y ago
thanks
Want results from more Discord servers?
Add your server