Q:

How to configure a default JsonSerializerOptions (System.Text.Json) to be used by Azure Function v3?

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'.

A:

Turns out I missed a step when upgrading my Azure Functions from v2 to v3. To make it work, I had to add the Microsoft.AspNetCore.App framework to my csproj. Otherwise, my project kept referencing JsonResult from Microsoft.Aspnet.Mvc.Core v2.X.X which does not support System.Text.Json.
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netcoreapp3.0</TargetFramework>
  </PropertyGroup>

  <!-- ADD THESE LINES -->
  <ItemGroup>
    <FrameworkReference Include="Microsoft.AspNetCore.App" />
  </ItemGroup>

</Project>

Then, I was able to specify my own JsonSerializerOptions instance like this:
return new JsonResult(<ContractClass>, NSJsonSerializerOptions.Default)
{
    StatusCode = StatusCodes.Status200OK
};

where NSJsonSerializerOptions.Default is a static instance of JsonSerializerOptions.

