问题
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