AddJsonOptions for MvcJsonOptions in Asp.Net Core 2.2

风流意气都作罢 提交于 2020-01-15 03:23:07

问题


I have read this question and this one about AddJsonOptions in older version (2.0 and 2.1 respectively).

I'm Using Asp.net Core 2.2 but there is not such method of AddJsonOptions under services. I also checked the documentation for asp.net core 2.1 where exist the MvcJsonOptions and AddJsonOptions for Core 2.1 but when changing it to version 2.2 it states there is no such page for that version.

Does anyone know where is gone this Service?


回答1:


As mentioned here MvcJsonOptions is moving to Microsoft.AspNetCore.Mvc in Asp.net core 2.2 as it's stated at this documentation too and already started to move there for asp.net core 2.1, and also the documentation for Asp.net core 2.2 is not updated yet and that is why we don't see it there.



来源:https://stackoverflow.com/questions/54051802/addjsonoptions-for-mvcjsonoptions-in-asp-net-core-2-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!