2中MvcJsonOptions的AddJsonOptions

2中MvcJsonOptions的AddJsonOptions

本文介绍了Asp.Net Core 2.2中MvcJsonOptions的AddJsonOptions的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已阅读此问题和AddJsonOptions的a href ="https://stackoverflow.com/questions/51064314/services-addjsonoptions-net-core-2-1?noredirect=1&lq=1">此 (分别为2.0和2.1).

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

我正在使用Asp.net Core 2.2,但在services下没有这样的AddJsonOptions方法.我还检查了文档对于asp.net core 2.1,对于Core 2.1存在MvcJsonOptionsAddJsonOptions,但是将其更改为2.2版时,它表示存在该版本没有这样的页面.

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?

推荐答案

如上所述 MvcJsonOptions移至Asp.net core 2.2中的Microsoft.AspNetCore.Mvc,如该文档也已经开始,并且已经开始将其用于asp.net core 2.1,以及有关Asp.net core 2.2尚未更新,这就是为什么我们在那里看不到它的原因.

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.

这篇关于Asp.Net Core 2.2中MvcJsonOptions的AddJsonOptions的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 20:39