Microsoft.AspNetCore.Mvc.NewtonsoftJson 9.0.2

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Microsoft.AspNetCore.Mvc.NewtonsoftJson --version 9.0.2                
NuGet\Install-Package Microsoft.AspNetCore.Mvc.NewtonsoftJson -Version 9.0.2                
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="9.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Microsoft.AspNetCore.Mvc.NewtonsoftJson --version 9.0.2                
#r "nuget: Microsoft.AspNetCore.Mvc.NewtonsoftJson, 9.0.2"                
#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.
// Install Microsoft.AspNetCore.Mvc.NewtonsoftJson as a Cake Addin
#addin nuget:?package=Microsoft.AspNetCore.Mvc.NewtonsoftJson&version=9.0.2

// Install Microsoft.AspNetCore.Mvc.NewtonsoftJson as a Cake Tool
#tool nuget:?package=Microsoft.AspNetCore.Mvc.NewtonsoftJson&version=9.0.2                

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 net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1.4K)

Showing the top 5 NuGet packages that depend on Microsoft.AspNetCore.Mvc.NewtonsoftJson:

Package Downloads
Swashbuckle.AspNetCore.Newtonsoft

Swagger Generator opt-in component to support Newtonsoft.Json serializer behaviors

Ocelot

Ocelot is an API gateway based on .NET stack.

Abp.AspNetCore

Abp.AspNetCore

Reo.Core.Hosting

Package Description

Omnia.Fx.NetCore.WebApp

Package Description

GitHub repositories (282)

Showing the top 5 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
Version Downloads Last updated
10.0.0-preview.2.25164.1 363 3/18/2025
10.0.0-preview.1.25120.3 1,975 2/25/2025
9.0.3 112,196 3/11/2025
9.0.2 540,514 2/11/2025
9.0.1 679,666 1/14/2025
9.0.0 1,802,192 11/12/2024
9.0.0-rc.2.24474.3 12,548 10/8/2024
9.0.0-rc.1.24452.1 9,884 9/10/2024
9.0.0-preview.7.24406.2 4,963 8/13/2024
9.0.0-preview.6.24328.4 15,132 7/9/2024
9.0.0-preview.5.24306.11 2,140 6/11/2024
9.0.0-preview.4.24267.6 2,255 5/21/2024
9.0.0-preview.3.24172.13 4,722 4/11/2024
9.0.0-preview.2.24128.4 4,616 3/12/2024
9.0.0-preview.1.24081.5 4,339 2/13/2024
8.0.14 118,095 3/11/2025
8.0.13 756,590 2/11/2025
8.0.12 1,229,241 1/14/2025
8.0.11 4,008,414 11/12/2024
8.0.10 5,672,591 10/8/2024
8.0.8 7,663,404 8/13/2024
8.0.7 5,271,142 7/9/2024
8.0.6 5,508,375 5/28/2024
8.0.5 1,937,326 5/14/2024
8.0.4 5,328,497 4/9/2024
8.0.3 4,146,139 3/12/2024
8.0.2 4,168,446 2/13/2024
8.0.1 6,154,653 1/9/2024
8.0.0 14,397,177 11/14/2023
8.0.0-rc.2.23480.2 59,115 10/10/2023
8.0.0-rc.1.23421.29 28,509 9/12/2023
8.0.0-preview.7.23375.9 15,520 8/8/2023
8.0.0-preview.6.23329.11 9,498 7/11/2023
8.0.0-preview.5.23302.2 7,232 6/13/2023
8.0.0-preview.4.23260.4 230,203 5/16/2023
8.0.0-preview.3.23177.8 18,699 4/11/2023
8.0.0-preview.2.23153.2 9,506 3/14/2023
8.0.0-preview.1.23112.2 15,471 2/21/2023
7.0.20 537,408 5/28/2024
7.0.19 116,552 5/14/2024
7.0.18 198,664 4/9/2024
7.0.17 237,822 3/12/2024
7.0.16 349,894 2/13/2024
7.0.15 683,303 1/9/2024
7.0.14 1,491,906 11/14/2023
7.0.13 1,712,056 10/24/2023
7.0.12 1,040,741 10/10/2023
7.0.11 1,561,429 9/12/2023
7.0.10 2,252,911 8/8/2023
7.0.9 1,646,920 7/11/2023
7.0.8 1,373,556 6/22/2023
7.0.7 1,233,504 6/13/2023
7.0.5 5,323,827 4/11/2023
7.0.4 2,077,103 3/14/2023
7.0.3 2,335,764 2/14/2023
7.0.2 3,145,516 1/10/2023
7.0.1 3,059,832 12/13/2022
7.0.0 13,385,857 11/7/2022
7.0.0-rc.2.22476.2 62,855 10/11/2022
7.0.0-rc.1.22427.2 10,199 9/14/2022
7.0.0-preview.7.22376.6 10,162 8/9/2022
7.0.0-preview.6.22330.3 7,986 7/12/2022
7.0.0-preview.5.22303.8 9,221 6/14/2022
7.0.0-preview.4.22251.1 8,929 5/10/2022
7.0.0-preview.3.22178.4 3,348 4/13/2022
7.0.0-preview.2.22153.2 10,911 3/14/2022
7.0.0-preview.1.22109.13 3,409 2/17/2022
6.0.36 381,141 11/12/2024
6.0.35 329,333 10/8/2024
6.0.33 1,195,216 8/13/2024
6.0.32 573,385 7/9/2024
6.0.31 617,912 5/28/2024
6.0.30 234,976 5/14/2024
6.0.29 796,495 4/9/2024
6.0.28 817,540 3/12/2024
6.0.27 2,647,078 2/13/2024
6.0.26 1,558,011 1/9/2024
6.0.25 2,952,056 11/14/2023
6.0.24 1,665,170 10/24/2023
6.0.23 801,346 10/10/2023
6.0.22 1,576,578 9/12/2023
6.0.21 2,145,802 8/8/2023
6.0.20 2,220,068 7/11/2023
6.0.19 1,299,611 6/22/2023
6.0.18 766,771 6/13/2023
6.0.16 5,766,750 4/11/2023
6.0.15 2,828,613 3/14/2023
6.0.14 3,060,969 2/14/2023
6.0.13 5,046,588 1/10/2023
6.0.12 4,566,414 12/13/2022
6.0.11 6,829,882 11/7/2022
6.0.10 9,565,324 10/11/2022
6.0.9 6,840,768 9/13/2022
6.0.8 9,132,173 8/9/2022
6.0.7 7,268,740 7/12/2022
6.0.6 6,003,368 6/14/2022
6.0.5 11,696,519 5/10/2022
6.0.4 6,766,473 4/11/2022
6.0.3 7,926,649 3/8/2022
6.0.2 6,952,001 2/8/2022
6.0.1 15,216,655 12/14/2021
6.0.0 15,120,890 11/8/2021
6.0.0-rc.2.21480.10 71,359 10/12/2021
6.0.0-rc.1.21452.15 22,222,756 9/14/2021
6.0.0-preview.7.21378.6 61,079 8/10/2021
6.0.0-preview.6.21355.2 9,812 7/14/2021
6.0.0-preview.5.21301.17 5,957 6/15/2021
6.0.0-preview.4.21253.5 12,124 5/24/2021
6.0.0-preview.3.21201.13 9,726 4/8/2021
6.0.0-preview.2.21154.6 6,348 3/11/2021 6.0.0-preview.2.21154.6 is deprecated because it is no longer maintained.
6.0.0-preview.1.21103.6 7,707 2/12/2021 6.0.0-preview.1.21103.6 is deprecated because it is no longer maintained.
5.0.17 2,261,954 5/10/2022 5.0.17 is deprecated because it is no longer maintained.
5.0.16 307,862 4/11/2022 5.0.16 is deprecated because it is no longer maintained.
5.0.15 724,949 3/8/2022 5.0.15 is deprecated because it is no longer maintained.
5.0.14 534,561 2/8/2022 5.0.14 is deprecated because it is no longer maintained.
5.0.13 2,917,766 12/14/2021 5.0.13 is deprecated because it is no longer maintained.
5.0.12 2,272,028 11/7/2021 5.0.12 is deprecated because it is no longer maintained.
5.0.11 5,170,943 10/12/2021 5.0.11 is deprecated because it is no longer maintained.
5.0.10 6,318,157 9/14/2021 5.0.10 is deprecated because it is no longer maintained.
5.0.9 3,903,762 8/10/2021 5.0.9 is deprecated because it is no longer maintained.
5.0.8 3,632,153 7/13/2021 5.0.8 is deprecated because it is no longer maintained.
5.0.7 3,683,231 6/8/2021 5.0.7 is deprecated because it is no longer maintained.
5.0.6 2,847,836 5/11/2021 5.0.6 is deprecated because it is no longer maintained.
5.0.5 3,917,786 4/6/2021 5.0.5 is deprecated because it is no longer maintained.
5.0.4 2,651,147 3/9/2021 5.0.4 is deprecated because it is no longer maintained.
5.0.3 3,952,788 2/9/2021 5.0.3 is deprecated because it is no longer maintained.
5.0.2 2,610,548 1/12/2021 5.0.2 is deprecated because it is no longer maintained.
5.0.1 2,148,105 12/8/2020 5.0.1 is deprecated because it is no longer maintained.
5.0.0 14,084,877 11/9/2020 5.0.0 is deprecated because it is no longer maintained.
5.0.0-rc.2.20475.17 31,227 10/13/2020 5.0.0-rc.2.20475.17 is deprecated because it is no longer maintained.
5.0.0-rc.1.20451.17 20,777 9/14/2020 5.0.0-rc.1.20451.17 is deprecated because it is no longer maintained.
5.0.0-preview.8.20414.8 4,656 8/25/2020 5.0.0-preview.8.20414.8 is deprecated because it is no longer maintained.
5.0.0-preview.7.20365.19 13,370 7/21/2020 5.0.0-preview.7.20365.19 is deprecated because it is no longer maintained.
5.0.0-preview.6.20312.15 6,462 6/25/2020 5.0.0-preview.6.20312.15 is deprecated because it is no longer maintained.
5.0.0-preview.5.20279.2 15,669 6/10/2020 5.0.0-preview.5.20279.2 is deprecated because it is no longer maintained.
5.0.0-preview.4.20257.10 4,853 5/18/2020 5.0.0-preview.4.20257.10 is deprecated because it is no longer maintained.
5.0.0-preview.3.20215.14 4,164 4/23/2020 5.0.0-preview.3.20215.14 is deprecated because it is no longer maintained.
5.0.0-preview.2.20167.3 2,678 4/2/2020 5.0.0-preview.2.20167.3 is deprecated because it is no longer maintained.
5.0.0-preview.1.20124.5 3,232 3/16/2020 5.0.0-preview.1.20124.5 is deprecated because it is no longer maintained.
3.1.32 1,390,441 12/13/2022
3.1.31 206,363 11/8/2022
3.1.30 313,067 10/11/2022
3.1.29 376,726 9/13/2022
3.1.28 513,747 8/9/2022
3.1.27 546,375 7/12/2022
3.1.26 411,581 6/14/2022
3.1.25 658,039 5/10/2022
3.1.24 419,662 4/11/2022
3.1.23 827,171 3/8/2022
3.1.22 3,120,773 12/14/2021
3.1.21 1,711,706 11/7/2021
3.1.20 1,208,707 10/11/2021
3.1.19 1,263,157 9/14/2021
3.1.18 1,819,352 8/10/2021
3.1.17 1,776,710 7/13/2021
3.1.16 2,286,924 6/8/2021
3.1.15 1,971,708 5/11/2021
3.1.14 2,533,557 4/6/2021
3.1.13 2,918,989 3/9/2021
3.1.12 2,791,974 2/9/2021
3.1.11 3,142,550 1/12/2021
3.1.10 7,161,243 11/9/2020
3.1.9 7,519,073 10/13/2020
3.1.8 9,289,644 9/8/2020
3.1.7 6,503,361 8/11/2020
3.1.6 7,178,799 7/14/2020
3.1.5 10,120,009 6/9/2020
3.1.4 12,174,611 5/12/2020
3.1.3 12,920,155 3/24/2020
3.1.2 9,013,538 2/18/2020
3.1.1 10,656,776 1/14/2020
3.1.0 10,212,108 12/3/2019
3.1.0-preview3.19555.2 44,599 11/13/2019 3.1.0-preview3.19555.2 is deprecated because it is no longer maintained.
3.1.0-preview2.19528.8 6,090 11/1/2019 3.1.0-preview2.19528.8 is deprecated because it is no longer maintained.
3.1.0-preview1.19508.20 13,010 10/15/2019 3.1.0-preview1.19508.20 is deprecated because it is no longer maintained.
3.0.3 584,785 2/18/2020 3.0.3 is deprecated because it is no longer maintained.
3.0.2 568,950 1/14/2020 3.0.2 is deprecated because it is no longer maintained.
3.0.0 30,963,077 9/23/2019 3.0.0 is deprecated because it is no longer maintained.
3.0.0-rc1.19457.4 39,122 9/16/2019 3.0.0-rc1.19457.4 is deprecated because it is no longer maintained.
3.0.0-preview9.19424.4 79,227 9/4/2019 3.0.0-preview9.19424.4 is deprecated because it is no longer maintained.
3.0.0-preview8.19405.7 111,849 8/13/2019 3.0.0-preview8.19405.7 is deprecated because it is no longer maintained.
3.0.0-preview7.19365.7 115,357 7/23/2019 3.0.0-preview7.19365.7 is deprecated because it is no longer maintained.
3.0.0-preview6.19307.2 275,965 6/12/2019 3.0.0-preview6.19307.2 is deprecated because it is no longer maintained.
3.0.0-preview5-19227-01 821,372 5/6/2019 3.0.0-preview5-19227-01 is deprecated because it is no longer maintained.
3.0.0-preview4-19216-03 38,772 4/18/2019 3.0.0-preview4-19216-03 is deprecated because it is no longer maintained.
3.0.0-preview3-19153-02 6,193,547 3/6/2019 3.0.0-preview3-19153-02 is deprecated because it is no longer maintained.
3.0.0-preview-19075-0444 22,830 1/29/2019 3.0.0-preview-19075-0444 is deprecated because it is no longer maintained.