I have a set of Azure Functions v3 running on .net core 3.1.
I have a custom configuration of JsonSerializerOptions
that I want to be used automatically by my functions when de/serializing data.
Question
How can I set up my Azure Functions so that they can use my default System.Text.Json.JsonSerializerOptions
instance?
Update 1
Following the suggestion from @sellotape, I found out the following documentation regarding the JsonResult
class:
The problem is that my JsonResult
instance does not have this property of type object ; it is only accepting a JsonSerializerSettings
instance.
Update 2
I still get the following error and I am not sure where Newtonsoft is coming from:
Microsoft.AspNetCore.Mvc.NewtonsoftJson: Property 'JsonResult.SerializerSettings' must be an instance of type 'Newtonsoft.Json.JsonSerializerSettings'.