Microsoft.AspNetCore.Mvc.NewtonsoftJson 9.0.2

Prefix Reserved
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 (281)

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 starting point for Clean Architecture with ASP.NET Core
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
9.0.2 10,404 2/11/2025
9.0.1 297,657 1/14/2025
9.0.0 1,070,440 11/12/2024
9.0.0-rc.2.24474.3 11,255 10/8/2024
9.0.0-rc.1.24452.1 9,683 9/10/2024
9.0.0-preview.7.24406.2 4,882 8/13/2024
9.0.0-preview.6.24328.4 14,965 7/9/2024
9.0.0-preview.5.24306.11 2,024 6/11/2024
9.0.0-preview.4.24267.6 2,183 5/21/2024
9.0.0-preview.3.24172.13 4,491 4/11/2024
9.0.0-preview.2.24128.4 4,473 3/12/2024
9.0.0-preview.1.24081.5 4,107 2/13/2024
8.0.13 9,107 2/11/2025
8.0.12 504,533 1/14/2025
8.0.11 2,595,514 11/12/2024
8.0.10 4,348,183 10/8/2024
8.0.8 6,409,260 8/13/2024
8.0.7 4,590,948 7/9/2024
8.0.6 4,895,606 5/28/2024
8.0.5 1,730,311 5/14/2024
8.0.4 4,780,977 4/9/2024
8.0.3 3,742,537 3/12/2024
8.0.2 3,778,553 2/13/2024
8.0.1 5,627,710 1/9/2024
8.0.0 12,037,744 11/14/2023
8.0.0-rc.2.23480.2 57,319 10/10/2023
8.0.0-rc.1.23421.29 28,152 9/12/2023
8.0.0-preview.7.23375.9 15,332 8/8/2023
8.0.0-preview.6.23329.11 9,144 7/11/2023
8.0.0-preview.5.23302.2 7,047 6/13/2023
8.0.0-preview.4.23260.4 202,811 5/16/2023
8.0.0-preview.3.23177.8 18,612 4/11/2023
8.0.0-preview.2.23153.2 9,278 3/14/2023
8.0.0-preview.1.23112.2 15,347 2/21/2023
7.0.20 427,957 5/28/2024
7.0.19 109,150 5/14/2024
7.0.18 185,462 4/9/2024
7.0.17 225,511 3/12/2024
7.0.16 337,577 2/13/2024
7.0.15 645,061 1/9/2024
7.0.14 1,420,717 11/14/2023
7.0.13 1,652,325 10/24/2023
7.0.12 990,008 10/10/2023
7.0.11 1,513,514 9/12/2023
7.0.10 2,196,435 8/8/2023
7.0.9 1,606,350 7/11/2023
7.0.8 1,347,019 6/22/2023
7.0.7 1,189,571 6/13/2023
7.0.5 5,178,797 4/11/2023
7.0.4 2,047,564 3/14/2023
7.0.3 2,278,925 2/14/2023
7.0.2 3,106,634 1/10/2023
7.0.1 2,950,909 12/13/2022
7.0.0 12,522,695 11/7/2022
7.0.0-rc.2.22476.2 62,696 10/11/2022
7.0.0-rc.1.22427.2 10,036 9/14/2022
7.0.0-preview.7.22376.6 10,076 8/9/2022
7.0.0-preview.6.22330.3 7,845 7/12/2022
7.0.0-preview.5.22303.8 9,013 6/14/2022
7.0.0-preview.4.22251.1 8,877 5/10/2022
7.0.0-preview.3.22178.4 3,297 4/13/2022
7.0.0-preview.2.22153.2 10,729 3/14/2022
7.0.0-preview.1.22109.13 3,353 2/17/2022
6.0.36 211,949 11/12/2024
6.0.35 254,854 10/8/2024
6.0.33 978,110 8/13/2024
6.0.32 506,809 7/9/2024
6.0.31 570,560 5/28/2024
6.0.30 220,558 5/14/2024
6.0.29 744,698 4/9/2024
6.0.28 777,172 3/12/2024
6.0.27 2,365,844 2/13/2024
6.0.26 1,474,884 1/9/2024
6.0.25 2,804,340 11/14/2023
6.0.24 1,568,720 10/24/2023
6.0.23 777,906 10/10/2023
6.0.22 1,512,506 9/12/2023
6.0.21 2,068,277 8/8/2023
6.0.20 2,146,289 7/11/2023
6.0.19 1,254,196 6/22/2023
6.0.18 742,950 6/13/2023
6.0.16 5,608,315 4/11/2023
6.0.15 2,732,096 3/14/2023
6.0.14 2,976,014 2/14/2023
6.0.13 4,901,518 1/10/2023
6.0.12 4,473,839 12/13/2022
6.0.11 6,567,870 11/7/2022
6.0.10 9,365,093 10/11/2022
6.0.9 6,683,474 9/13/2022
6.0.8 8,951,832 8/9/2022
6.0.7 7,152,089 7/12/2022
6.0.6 5,877,643 6/14/2022
6.0.5 11,414,866 5/10/2022
6.0.4 6,650,858 4/11/2022
6.0.3 7,830,683 3/8/2022
6.0.2 6,872,570 2/8/2022
6.0.1 14,837,572 12/14/2021
6.0.0 14,674,803 11/8/2021
6.0.0-rc.2.21480.10 70,819 10/12/2021
6.0.0-rc.1.21452.15 21,675,603 9/14/2021
6.0.0-preview.7.21378.6 59,619 8/10/2021
6.0.0-preview.6.21355.2 9,741 7/14/2021
6.0.0-preview.5.21301.17 5,905 6/15/2021
6.0.0-preview.4.21253.5 11,183 5/24/2021
6.0.0-preview.3.21201.13 8,472 4/8/2021
6.0.0-preview.2.21154.6 6,267 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,644 2/12/2021 6.0.0-preview.1.21103.6 is deprecated because it is no longer maintained.
5.0.17 2,209,471 5/10/2022 5.0.17 is deprecated because it is no longer maintained.
5.0.16 302,254 4/11/2022 5.0.16 is deprecated because it is no longer maintained.
5.0.15 711,786 3/8/2022 5.0.15 is deprecated because it is no longer maintained.
5.0.14 526,606 2/8/2022 5.0.14 is deprecated because it is no longer maintained.
5.0.13 2,890,795 12/14/2021 5.0.13 is deprecated because it is no longer maintained.
5.0.12 2,245,684 11/7/2021 5.0.12 is deprecated because it is no longer maintained.
5.0.11 5,131,126 10/12/2021 5.0.11 is deprecated because it is no longer maintained.
5.0.10 6,261,191 9/14/2021 5.0.10 is deprecated because it is no longer maintained.
5.0.9 3,850,307 8/10/2021 5.0.9 is deprecated because it is no longer maintained.
5.0.8 3,600,302 7/13/2021 5.0.8 is deprecated because it is no longer maintained.
5.0.7 3,649,466 6/8/2021 5.0.7 is deprecated because it is no longer maintained.
5.0.6 2,828,124 5/11/2021 5.0.6 is deprecated because it is no longer maintained.
5.0.5 3,896,162 4/6/2021 5.0.5 is deprecated because it is no longer maintained.
5.0.4 2,628,246 3/9/2021 5.0.4 is deprecated because it is no longer maintained.
5.0.3 3,920,703 2/9/2021 5.0.3 is deprecated because it is no longer maintained.
5.0.2 2,581,426 1/12/2021 5.0.2 is deprecated because it is no longer maintained.
5.0.1 2,133,215 12/8/2020 5.0.1 is deprecated because it is no longer maintained.
5.0.0 13,870,144 11/9/2020 5.0.0 is deprecated because it is no longer maintained.
5.0.0-rc.2.20475.17 31,070 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,567 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,587 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,277 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,392 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,592 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,775 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,090 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,618 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,168 3/16/2020 5.0.0-preview.1.20124.5 is deprecated because it is no longer maintained.
3.1.32 1,320,214 12/13/2022
3.1.31 200,694 11/8/2022
3.1.30 303,380 10/11/2022
3.1.29 365,705 9/13/2022
3.1.28 500,676 8/9/2022
3.1.27 538,463 7/12/2022
3.1.26 404,663 6/14/2022
3.1.25 646,836 5/10/2022
3.1.24 415,880 4/11/2022
3.1.23 817,031 3/8/2022
3.1.22 3,072,835 12/14/2021
3.1.21 1,688,961 11/7/2021
3.1.20 1,196,302 10/11/2021
3.1.19 1,250,654 9/14/2021
3.1.18 1,793,683 8/10/2021
3.1.17 1,751,869 7/13/2021
3.1.16 2,259,557 6/8/2021
3.1.15 1,940,687 5/11/2021
3.1.14 2,502,355 4/6/2021
3.1.13 2,895,947 3/9/2021
3.1.12 2,755,807 2/9/2021
3.1.11 3,109,834 1/12/2021
3.1.10 7,095,361 11/9/2020
3.1.9 7,459,346 10/13/2020
3.1.8 9,234,846 9/8/2020
3.1.7 6,462,076 8/11/2020
3.1.6 7,097,839 7/14/2020
3.1.5 10,049,249 6/9/2020
3.1.4 12,117,798 5/12/2020
3.1.3 12,820,501 3/24/2020
3.1.2 8,936,035 2/18/2020
3.1.1 10,554,464 1/14/2020
3.1.0 10,086,052 12/3/2019
3.1.0-preview3.19555.2 44,488 11/13/2019 3.1.0-preview3.19555.2 is deprecated because it is no longer maintained.
3.1.0-preview2.19528.8 6,016 11/1/2019 3.1.0-preview2.19528.8 is deprecated because it is no longer maintained.
3.1.0-preview1.19508.20 12,897 10/15/2019 3.1.0-preview1.19508.20 is deprecated because it is no longer maintained.
3.0.3 577,680 2/18/2020 3.0.3 is deprecated because it is no longer maintained.
3.0.2 565,775 1/14/2020 3.0.2 is deprecated because it is no longer maintained.
3.0.0 30,567,349 9/23/2019 3.0.0 is deprecated because it is no longer maintained.
3.0.0-rc1.19457.4 38,784 9/16/2019 3.0.0-rc1.19457.4 is deprecated because it is no longer maintained.
3.0.0-preview9.19424.4 78,978 9/4/2019 3.0.0-preview9.19424.4 is deprecated because it is no longer maintained.
3.0.0-preview8.19405.7 111,442 8/13/2019 3.0.0-preview8.19405.7 is deprecated because it is no longer maintained.
3.0.0-preview7.19365.7 114,920 7/23/2019 3.0.0-preview7.19365.7 is deprecated because it is no longer maintained.
3.0.0-preview6.19307.2 275,669 6/12/2019 3.0.0-preview6.19307.2 is deprecated because it is no longer maintained.
3.0.0-preview5-19227-01 814,683 5/6/2019 3.0.0-preview5-19227-01 is deprecated because it is no longer maintained.
3.0.0-preview4-19216-03 38,129 4/18/2019 3.0.0-preview4-19216-03 is deprecated because it is no longer maintained.
3.0.0-preview3-19153-02 6,150,535 3/6/2019 3.0.0-preview3-19153-02 is deprecated because it is no longer maintained.
3.0.0-preview-19075-0444 22,701 1/29/2019 3.0.0-preview-19075-0444 is deprecated because it is no longer maintained.