Microsoft.AspNetCore.Mvc.NewtonsoftJson 10.0.0-preview.4.25255.103

Prefix Reserved
This is a prerelease version of Microsoft.AspNetCore.Mvc.NewtonsoftJson.
dotnet add package Microsoft.AspNetCore.Mvc.NewtonsoftJson --version 10.0.0-preview.4.25255.103
                    
NuGet\Install-Package Microsoft.AspNetCore.Mvc.NewtonsoftJson -Version 10.0.0-preview.4.25255.103
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="10.0.0-preview.4.25255.103" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="10.0.0-preview.4.25255.103" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.AspNetCore.Mvc.NewtonsoftJson --version 10.0.0-preview.4.25255.103
                    
#r "nuget: Microsoft.AspNetCore.Mvc.NewtonsoftJson, 10.0.0-preview.4.25255.103"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Microsoft.AspNetCore.Mvc.NewtonsoftJson&version=10.0.0-preview.4.25255.103&prerelease
                    
Install Microsoft.AspNetCore.Mvc.NewtonsoftJson as a Cake Addin
#tool nuget:?package=Microsoft.AspNetCore.Mvc.NewtonsoftJson&version=10.0.0-preview.4.25255.103&prerelease
                    
Install Microsoft.AspNetCore.Mvc.NewtonsoftJson as a Cake Tool

About

Microsoft.AspNetCore.Mvc.NewtonsoftJson is a NuGet package designed to enable the use of JSON serialization and deserialization using Newtonsoft.Json in ASP.NET Core MVC applications. This package provides support for handling JSON input and output in ASP.NET Core MVC controllers, allowing for seamless integration with existing Newtonsoft.Json configurations and features.

Key Features

  • Integration of Newtonsoft.Json into ASP.NET Core MVC for JSON serialization and deserialization.
  • Compatible with ASP.NET Core 3.0 and newer.
  • Allows customization of JSON serialization settings.
  • Supports handling JSON requests and responses in MVC controllers.

How to Use

To start using Microsoft.AspNetCore.Mvc.NewtonsoftJson in your ASP.NET Core MVC application, follow these steps:

Installation

dotnet add package Microsoft.AspNetCore.Mvc.NewtonsoftJson

Configuration

In your Startup.cs file, configure NewtonsoftJson as the default JSON serializer for ASP.NET Core MVC:

using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;

public void ConfigureServices(IServiceCollection services)
{
    services.AddControllersWithViews()
        .AddNewtonsoftJson(options =>
        {
            // Configure Newtonsoft.Json options here
            options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
            options.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;
        });
}

Usage

Now, you can use Newtonsoft.Json serialization and deserialization in your ASP.NET Core MVC controllers:

using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;

public class SampleController : Controller
{
    [HttpPost]
    public IActionResult Post([FromBody] MyModel model)
    {
        // Your action logic here
    }
}

public class MyModel
{
    public string Name { get; set; }
    public int Age { get; set; }
}

For more information on configuring and using Newtonsoft.Json in ASP.NET Core MVC, refer to the official documentation.

Main Types

The main types provided by this library are:

  • NewtonsoftJsonOptions: Options for configuring Newtonsoft.Json serialization settings.
  • NewtonsoftJsonInputFormatter: Input formatter for handling JSON input using Newtonsoft.Json.
  • NewtonsoftJsonOutputFormatter: Output formatter for handling JSON output using Newtonsoft.Json.

Additional Documentation

Feedback & Contributing

Microsoft.AspNetCore.Authentication.JwtBearer is released as open-source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

GitHub repositories (284)

Showing the top 20 popular GitHub repositories that depend on Microsoft.AspNetCore.Mvc.NewtonsoftJson:

Repository Stars
PowerShell/PowerShell
PowerShell for every system!
ardalis/CleanArchitecture
Clean Architecture Solution Template: A proven Clean Architecture Template for ASP.NET Core 9
abpframework/abp
Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
Jackett/Jackett
API Support for your favorite torrent trackers
dotnet/AspNetCore.Docs
Documentation for ASP.NET Core
aspnetboilerplate/aspnetboilerplate
ASP.NET Boilerplate - Web Application Framework
dodyg/practical-aspnetcore
Practical samples of ASP.NET Core 10 Preview 4, 9, 8.0, 7.0, 6.0, 5.0, 3.1, 2.2, and 2.1,projects you can use. Readme contains explanations on all projects.
nopSolutions/nopCommerce
ASP.NET Core eCommerce software. nopCommerce is a free and open-source shopping cart.
JeffreySu/WeiXinMPSDK
微信全平台 .NET SDK, Senparc.Weixin for C#,支持 .NET Framework 及 .NET Core、.NET 8.0。已支持微信公众号、小程序、小游戏、微信支付、企业微信/企业号、开放平台、JSSDK、微信周边等全平台。 WeChat SDK for C#.
ThreeMammals/Ocelot
.NET API Gateway
ElectronNET/Electron.NET
:electron: Build cross platform desktop apps with ASP.NET Core (Razor Pages, MVC, Blazor).
RicoSuter/NSwag
The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.
btcpayserver/btcpayserver
Accept Bitcoin payments. Free, open-source & self-hosted, Bitcoin payment processor.
domaindrivendev/Swashbuckle.AspNetCore
Swagger tools for documenting API's built on ASP.NET Core
anjoy8/Blog.Core
💖 ASP.NET Core 8.0 全家桶教程,前后端分离后端接口,vue教程姊妹篇,官方文档:
jasontaylordev/NorthwindTraders
Northwind Traders is a sample application built using ASP.NET Core and Entity Framework Core.
MapsterMapper/Mapster
A fast, fun and stimulating object to object Mapper
cobbr/Covenant
Covenant is a collaborative .NET C2 framework for red teamers.
simplcommerce/SimplCommerce
A simple, cross platform, modulith ecommerce system built on .NET
BililiveRecorder/BililiveRecorder
录播姬 | mikufans 生放送录制
Version Downloads Last updated
10.0.0-preview.4.25255.103 0 5/12/2025
3.0.0-preview-19075-0444 1 1/28/2019