你的位置: 码友网首页 / 资讯源列表 / Why model binding to JObject from a request doesn’t work anymore in ASP.NET Core 3.1 and what’s the alternative ?

关于[Why model binding to JObject from a request doesn’t work anymore in ASP.NET Core 3.1 and what’s the alternative ?]的摘要:

Json.Net (NewtonSoft) has been for a long time the most used JSON serializer in .NET world. Since .NET Core 3 and ASP.NET Core 3 Microsoft introduced a new one named System.Text.Json. JObject is a class that belongs to Json.Net (NewtonSoft) and if this latest is replaced by System.Text.Json, in this case you should expect that using JObject will no longer work. Unfortunately I have had to deal with JObject in request payloads and in this article I will show you how to live without JObject and how replace it without breaking your application.

原文地址: https://anthonygiretti.com/2020/05/10/why-model-binding-to-jobject-from-a-request-doesnt-work-anymore-in-asp-net-core-3-1-and-whats-the-alternative/

收录时间: 2020-05-11 浏览量: 2331 分类: ASP.NET Core

| 0 收藏 | 0