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

Prefix Reserved
This is a prerelease version of Microsoft.AspNetCore.Mvc.NewtonsoftJson.
dotnet add package Microsoft.AspNetCore.Mvc.NewtonsoftJson --version 10.0.0-preview.2.25164.1
                    
NuGet\Install-Package Microsoft.AspNetCore.Mvc.NewtonsoftJson -Version 10.0.0-preview.2.25164.1
                    
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.2.25164.1" />
                    
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.2.25164.1" />
                    
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.2.25164.1
                    
#r "nuget: Microsoft.AspNetCore.Mvc.NewtonsoftJson, 10.0.0-preview.2.25164.1"
                    
#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.2.25164.1&prerelease
                    
Install Microsoft.AspNetCore.Mvc.NewtonsoftJson as a Cake Addin
#tool nuget:?package=Microsoft.AspNetCore.Mvc.NewtonsoftJson&version=10.0.0-preview.2.25164.1&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. 
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 (275)

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 1,346 20 days ago
10.0.0-preview.1.25120.3 2,136 a month ago
9.0.3 344,028 a month ago
9.0.2 665,482 2 months ago
9.0.1 759,617 3 months ago
9.0.0 2,023,076 5 months ago
9.0.0-rc.2.24474.3 12,669 6 months ago
9.0.0-rc.1.24452.1 9,930 7 months ago
9.0.0-preview.7.24406.2 4,978 8 months ago
9.0.0-preview.6.24328.4 15,151 9 months ago
9.0.0-preview.5.24306.11 2,159 10 months ago
9.0.0-preview.4.24267.6 2,261 5/21/2024
9.0.0-preview.3.24172.13 4,842 4/11/2024
9.0.0-preview.2.24128.4 4,631 3/12/2024
9.0.0-preview.1.24081.5 4,517 2/13/2024
8.0.14 425,677 a month ago
8.0.13 928,922 2 months ago
8.0.12 1,416,018 3 months ago
8.0.11 4,404,701 5 months ago
8.0.10 6,052,129 6 months ago
8.0.8 8,014,833 8 months ago
8.0.7 5,476,113 9 months ago
8.0.6 5,698,254 5/28/2024
8.0.5 1,995,659 5/14/2024
8.0.4 5,496,780 4/9/2024
8.0.3 4,260,629 3/12/2024
8.0.2 4,273,748 2/13/2024
8.0.1 6,330,766 1/9/2024
8.0.0 15,136,893 11/14/2023
8.0.0-rc.2.23480.2 59,450 10/10/2023
8.0.0-rc.1.23421.29 28,642 9/12/2023
8.0.0-preview.7.23375.9 15,552 8/8/2023
8.0.0-preview.6.23329.11 9,569 7/11/2023
8.0.0-preview.5.23302.2 7,341 6/13/2023
8.0.0-preview.4.23260.4 238,494 5/16/2023
8.0.0-preview.3.23177.8 18,734 4/11/2023
8.0.0-preview.2.23153.2 9,586 3/14/2023
8.0.0-preview.1.23112.2 15,482 2/21/2023
7.0.20 568,598 5/28/2024
7.0.19 118,441 5/14/2024
7.0.18 201,684 4/9/2024
7.0.17 240,986 3/12/2024
7.0.16 353,845 2/13/2024
7.0.15 695,076 1/9/2024
7.0.14 1,512,687 11/14/2023
7.0.13 1,729,008 10/24/2023
7.0.12 1,057,121 10/10/2023
7.0.11 1,574,630 9/12/2023
7.0.10 2,268,134 8/8/2023
7.0.9 1,658,863 7/11/2023
7.0.8 1,381,587 6/22/2023
7.0.7 1,246,429 6/13/2023
7.0.5 5,356,993 4/11/2023
7.0.4 2,085,671 3/14/2023
7.0.3 2,352,589 2/14/2023
7.0.2 3,155,957 1/10/2023
7.0.1 3,101,180 12/13/2022
7.0.0 13,645,495 11/7/2022
7.0.0-rc.2.22476.2 62,882 10/11/2022
7.0.0-rc.1.22427.2 10,233 9/14/2022
7.0.0-preview.7.22376.6 10,180 8/9/2022
7.0.0-preview.6.22330.3 8,022 7/12/2022
7.0.0-preview.5.22303.8 9,257 6/14/2022
7.0.0-preview.4.22251.1 8,956 5/10/2022
7.0.0-preview.3.22178.4 3,354 4/13/2022
7.0.0-preview.2.22153.2 10,962 3/14/2022
7.0.0-preview.1.22109.13 3,414 2/17/2022
6.0.36 429,907 5 months ago
6.0.35 348,759 6 months ago
6.0.33 1,274,048 8 months ago
6.0.32 591,969 9 months ago
6.0.31 632,255 5/28/2024
6.0.30 238,542 5/14/2024
6.0.29 811,320 4/9/2024
6.0.28 827,915 3/12/2024
6.0.27 2,734,456 2/13/2024
6.0.26 1,582,937 1/9/2024
6.0.25 2,995,681 11/14/2023
6.0.24 1,690,428 10/24/2023
6.0.23 808,381 10/10/2023
6.0.22 1,594,784 9/12/2023
6.0.21 2,168,409 8/8/2023
6.0.20 2,238,908 7/11/2023
6.0.19 1,313,102 6/22/2023
6.0.18 773,483 6/13/2023
6.0.16 5,811,814 4/11/2023
6.0.15 2,859,481 3/14/2023
6.0.14 3,083,216 2/14/2023
6.0.13 5,087,242 1/10/2023
6.0.12 4,593,579 12/13/2022
6.0.11 6,904,356 11/7/2022
6.0.10 9,627,582 10/11/2022
6.0.9 6,886,145 9/13/2022
6.0.8 9,186,596 8/9/2022
6.0.7 7,302,653 7/12/2022
6.0.6 6,042,312 6/14/2022
6.0.5 11,768,996 5/10/2022
6.0.4 6,799,514 4/11/2022
6.0.3 7,952,162 3/8/2022
6.0.2 6,975,855 2/8/2022
6.0.1 15,320,610 12/14/2021
6.0.0 15,239,476 11/8/2021
6.0.0-rc.2.21480.10 71,468 10/12/2021
6.0.0-rc.1.21452.15 22,383,453 9/14/2021
6.0.0-preview.7.21378.6 61,476 8/10/2021
6.0.0-preview.6.21355.2 9,817 7/14/2021
6.0.0-preview.5.21301.17 5,964 6/15/2021
6.0.0-preview.4.21253.5 12,129 5/24/2021
6.0.0-preview.3.21201.13 9,738 4/8/2021
6.0.0-preview.2.21154.6 6,355 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,717 2/12/2021 6.0.0-preview.1.21103.6 is deprecated because it is no longer maintained.
5.0.17 2,280,971 5/10/2022 5.0.17 is deprecated because it is no longer maintained.
5.0.16 309,349 4/11/2022 5.0.16 is deprecated because it is no longer maintained.
5.0.15 729,237 3/8/2022 5.0.15 is deprecated because it is no longer maintained.
5.0.14 536,853 2/8/2022 5.0.14 is deprecated because it is no longer maintained.
5.0.13 2,928,068 12/14/2021 5.0.13 is deprecated because it is no longer maintained.
5.0.12 2,278,368 11/7/2021 5.0.12 is deprecated because it is no longer maintained.
5.0.11 5,181,626 10/12/2021 5.0.11 is deprecated because it is no longer maintained.
5.0.10 6,333,091 9/14/2021 5.0.10 is deprecated because it is no longer maintained.
5.0.9 3,917,565 8/10/2021 5.0.9 is deprecated because it is no longer maintained.
5.0.8 3,641,442 7/13/2021 5.0.8 is deprecated because it is no longer maintained.
5.0.7 3,692,510 6/8/2021 5.0.7 is deprecated because it is no longer maintained.
5.0.6 2,853,015 5/11/2021 5.0.6 is deprecated because it is no longer maintained.
5.0.5 3,924,043 4/6/2021 5.0.5 is deprecated because it is no longer maintained.
5.0.4 2,657,886 3/9/2021 5.0.4 is deprecated because it is no longer maintained.
5.0.3 3,962,160 2/9/2021 5.0.3 is deprecated because it is no longer maintained.
5.0.2 2,618,121 1/12/2021 5.0.2 is deprecated because it is no longer maintained.
5.0.1 2,152,869 12/8/2020 5.0.1 is deprecated because it is no longer maintained.
5.0.0 14,147,694 11/9/2020 5.0.0 is deprecated because it is no longer maintained.
5.0.0-rc.2.20475.17 31,241 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,825 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,665 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,382 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,470 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,677 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,862 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,172 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,687 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,241 3/16/2020 5.0.0-preview.1.20124.5 is deprecated because it is no longer maintained.
3.1.32 1,409,910 12/13/2022
3.1.31 208,293 11/8/2022
3.1.30 315,696 10/11/2022
3.1.29 379,541 9/13/2022
3.1.28 517,226 8/9/2022
3.1.27 548,191 7/12/2022
3.1.26 413,891 6/14/2022
3.1.25 660,639 5/10/2022
3.1.24 420,562 4/11/2022
3.1.23 829,928 3/8/2022
3.1.22 3,133,656 12/14/2021
3.1.21 1,720,015 11/7/2021
3.1.20 1,212,215 10/11/2021
3.1.19 1,266,923 9/14/2021
3.1.18 1,827,025 8/10/2021
3.1.17 1,783,218 7/13/2021
3.1.16 2,294,221 6/8/2021
3.1.15 1,979,813 5/11/2021
3.1.14 2,541,116 4/6/2021
3.1.13 2,925,993 3/9/2021
3.1.12 2,801,389 2/9/2021
3.1.11 3,151,246 1/12/2021
3.1.10 7,182,115 11/9/2020
3.1.9 7,536,359 10/13/2020
3.1.8 9,305,738 9/8/2020
3.1.7 6,515,739 8/11/2020
3.1.6 7,202,377 7/14/2020
3.1.5 10,141,249 6/9/2020
3.1.4 12,192,625 5/12/2020
3.1.3 12,950,021 3/24/2020
3.1.2 9,035,443 2/18/2020
3.1.1 10,687,470 1/14/2020
3.1.0 10,253,146 12/3/2019
3.1.0-preview3.19555.2 44,616 11/13/2019 3.1.0-preview3.19555.2 is deprecated because it is no longer maintained.
3.1.0-preview2.19528.8 6,100 11/1/2019 3.1.0-preview2.19528.8 is deprecated because it is no longer maintained.
3.1.0-preview1.19508.20 13,021 10/15/2019 3.1.0-preview1.19508.20 is deprecated because it is no longer maintained.
3.0.3 586,958 2/18/2020 3.0.3 is deprecated because it is no longer maintained.
3.0.2 569,860 1/14/2020 3.0.2 is deprecated because it is no longer maintained.
3.0.0 31,079,385 9/23/2019 3.0.0 is deprecated because it is no longer maintained.
3.0.0-rc1.19457.4 39,210 9/16/2019 3.0.0-rc1.19457.4 is deprecated because it is no longer maintained.
3.0.0-preview9.19424.4 79,307 9/4/2019 3.0.0-preview9.19424.4 is deprecated because it is no longer maintained.
3.0.0-preview8.19405.7 111,946 8/13/2019 3.0.0-preview8.19405.7 is deprecated because it is no longer maintained.
3.0.0-preview7.19365.7 115,495 7/23/2019 3.0.0-preview7.19365.7 is deprecated because it is no longer maintained.
3.0.0-preview6.19307.2 276,021 6/12/2019 3.0.0-preview6.19307.2 is deprecated because it is no longer maintained.
3.0.0-preview5-19227-01 823,181 5/6/2019 3.0.0-preview5-19227-01 is deprecated because it is no longer maintained.
3.0.0-preview4-19216-03 38,884 4/18/2019 3.0.0-preview4-19216-03 is deprecated because it is no longer maintained.
3.0.0-preview3-19153-02 6,204,670 3/6/2019 3.0.0-preview3-19153-02 is deprecated because it is no longer maintained.
3.0.0-preview-19075-0444 22,849 1/29/2019 3.0.0-preview-19075-0444 is deprecated because it is no longer maintained.