You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/dotnet-isolated-process-guide.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -719,11 +719,16 @@ To enable ASP.NET Core integration for HTTP:
719
719
720
720
#### JSON serialization with ASP.NET Core integration
721
721
722
-
ASP.NETCorehasitsownserializationlayer, anditisnotaffectedby [customizinggeneralserializationconfiguration](#customizing-json-serialization). TocustomizetheserializationbehaviorusedforyourHTTPtriggers, youneedtoincludean `.AddMvc()` callaspartofserviceregistration. Thereturned `IMvcBuilder` canbeusedtomodifyASP.NETCore's JSON serialization settings. The following example shows how to configure JSON.NET (`Newtonsoft.Json`) for serialization using this approach:
Youcancontinuetouse `HttpRequestData` and `HttpResponsedata` whileusingASP.NETintegration, thoughformostapps, it's better to instead use `HttpRequest` and `IActionResult`. Using `HttpRequestData`/`HttpResponseData` doesn'tinvoketheASP.NETCoreserializationlayerandinsteadreliesuponthe [generalworkerserializationconfiguration](#customizing-json-serialization) fortheapp. However, whenASP.NETCoreintegrationisenabled, youmightstillneedtoaddconfiguration. ThedefaultbehaviorfromASP.NETCoreistodisallowsynchronousIO. TouseacustomserializerthatdoesnotsupportasynchronousIO, suchas `NewtonsoftJsonObjectSerializer`, youneedtoenablesynchronousIOforyourapplicationbyconfiguringthe `KestrelServerOptions`.
725
+
726
+
ThefollowingexampleshowshowtoconfigureJSON.NET (`Newtonsoft.Json`) andthe [Microsoft.AspNetCore.Mvc.NewtonsoftJsonNuGetpackage](https://www.nuget.org/packages/Microsoft.AspNetCore.Mvc.NewtonsoftJson) for serialization using this approach:
0 commit comments