Microsoft.AspNetCore.Mvc.NewtonsoftJson
9.0.0
Prefix Reserved
dotnet add package Microsoft.AspNetCore.Mvc.NewtonsoftJson --version 9.0.0
NuGet\Install-Package Microsoft.AspNetCore.Mvc.NewtonsoftJson -Version 9.0.0
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.0" />
paket add Microsoft.AspNetCore.Mvc.NewtonsoftJson --version 9.0.0
#r "nuget: Microsoft.AspNetCore.Mvc.NewtonsoftJson, 9.0.0"
// Install Microsoft.AspNetCore.Mvc.NewtonsoftJson as a Cake Addin #addin nuget:?package=Microsoft.AspNetCore.Mvc.NewtonsoftJson&version=9.0.0 // Install Microsoft.AspNetCore.Mvc.NewtonsoftJson as a Cake Tool #tool nuget:?package=Microsoft.AspNetCore.Mvc.NewtonsoftJson&version=9.0.0
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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. |
-
net9.0
- Microsoft.AspNetCore.JsonPatch (>= 9.0.0)
- Newtonsoft.Json (>= 13.0.3)
- Newtonsoft.Json.Bson (>= 1.0.2)
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 (286)
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.
|
|
dotnet/AspNetCore.Docs
Documentation for ASP.NET Core
|
|
Jackett/Jackett
API Support for your favorite torrent trackers
|
Version | Downloads | Last updated | |
---|---|---|---|
9.0.0 | 71,918 | 11/12/2024 | |
9.0.0-rc.2.24474.3 | 9,591 | 10/8/2024 | |
9.0.0-rc.1.24452.1 | 9,390 | 9/10/2024 | |
9.0.0-preview.7.24406.2 | 4,772 | 8/13/2024 | |
9.0.0-preview.6.24328.4 | 14,640 | 7/9/2024 | |
9.0.0-preview.5.24306.11 | 1,937 | 6/11/2024 | |
9.0.0-preview.4.24267.6 | 2,118 | 5/21/2024 | |
9.0.0-preview.3.24172.13 | 4,370 | 4/11/2024 | |
9.0.0-preview.2.24128.4 | 4,356 | 3/12/2024 | |
9.0.0-preview.1.24081.5 | 3,948 | 2/13/2024 | |
8.0.11 | 231,311 | 11/12/2024 | |
8.0.10 | 2,078,937 | 10/8/2024 | |
8.0.8 | 4,497,843 | 8/13/2024 | |
8.0.7 | 3,549,371 | 7/9/2024 | |
8.0.6 | 3,970,378 | 5/28/2024 | |
8.0.5 | 1,443,078 | 5/14/2024 | |
8.0.4 | 3,966,049 | 4/9/2024 | |
8.0.3 | 3,192,413 | 3/12/2024 | |
8.0.2 | 3,261,784 | 2/13/2024 | |
8.0.1 | 4,916,899 | 1/9/2024 | |
8.0.0 | 9,078,478 | 11/14/2023 | |
8.0.0-rc.2.23480.2 | 54,686 | 10/10/2023 | |
8.0.0-rc.1.23421.29 | 27,746 | 9/12/2023 | |
8.0.0-preview.7.23375.9 | 14,957 | 8/8/2023 | |
8.0.0-preview.6.23329.11 | 8,975 | 7/11/2023 | |
8.0.0-preview.5.23302.2 | 6,622 | 6/13/2023 | |
8.0.0-preview.4.23260.4 | 188,032 | 5/16/2023 | |
8.0.0-preview.3.23177.8 | 18,497 | 4/11/2023 | |
8.0.0-preview.2.23153.2 | 8,998 | 3/14/2023 | |
8.0.0-preview.1.23112.2 | 15,045 | 2/21/2023 | |
7.0.20 | 298,009 | 5/28/2024 | |
7.0.19 | 98,161 | 5/14/2024 | |
7.0.18 | 161,944 | 4/9/2024 | |
7.0.17 | 203,973 | 3/12/2024 | |
7.0.16 | 317,299 | 2/13/2024 | |
7.0.15 | 576,365 | 1/9/2024 | |
7.0.14 | 1,284,718 | 11/14/2023 | |
7.0.13 | 1,564,357 | 10/24/2023 | |
7.0.12 | 908,025 | 10/10/2023 | |
7.0.11 | 1,440,379 | 9/12/2023 | |
7.0.10 | 2,113,826 | 8/8/2023 | |
7.0.9 | 1,546,155 | 7/11/2023 | |
7.0.8 | 1,309,280 | 6/22/2023 | |
7.0.7 | 1,134,475 | 6/13/2023 | |
7.0.5 | 5,014,030 | 4/11/2023 | |
7.0.4 | 1,998,394 | 3/14/2023 | |
7.0.3 | 2,190,967 | 2/14/2023 | |
7.0.2 | 3,040,393 | 1/10/2023 | |
7.0.1 | 2,791,524 | 12/13/2022 | |
7.0.0 | 11,292,780 | 11/7/2022 | |
7.0.0-rc.2.22476.2 | 62,374 | 10/11/2022 | |
7.0.0-rc.1.22427.2 | 9,786 | 9/14/2022 | |
7.0.0-preview.7.22376.6 | 9,986 | 8/9/2022 | |
7.0.0-preview.6.22330.3 | 7,623 | 7/12/2022 | |
7.0.0-preview.5.22303.8 | 8,765 | 6/14/2022 | |
7.0.0-preview.4.22251.1 | 8,840 | 5/10/2022 | |
7.0.0-preview.3.22178.4 | 3,265 | 4/13/2022 | |
7.0.0-preview.2.22153.2 | 10,440 | 3/14/2022 | |
7.0.0-preview.1.22109.13 | 3,323 | 2/17/2022 | |
6.0.36 | 30,248 | 11/12/2024 | |
6.0.35 | 120,698 | 10/8/2024 | |
6.0.33 | 573,755 | 8/13/2024 | |
6.0.32 | 404,695 | 7/9/2024 | |
6.0.31 | 500,405 | 5/28/2024 | |
6.0.30 | 192,049 | 5/14/2024 | |
6.0.29 | 664,391 | 4/9/2024 | |
6.0.28 | 702,633 | 3/12/2024 | |
6.0.27 | 2,020,704 | 2/13/2024 | |
6.0.26 | 1,355,204 | 1/9/2024 | |
6.0.25 | 2,581,516 | 11/14/2023 | |
6.0.24 | 1,455,205 | 10/24/2023 | |
6.0.23 | 739,435 | 10/10/2023 | |
6.0.22 | 1,432,192 | 9/12/2023 | |
6.0.21 | 1,952,030 | 8/8/2023 | |
6.0.20 | 2,034,824 | 7/11/2023 | |
6.0.19 | 1,189,048 | 6/22/2023 | |
6.0.18 | 704,187 | 6/13/2023 | |
6.0.16 | 5,369,157 | 4/11/2023 | |
6.0.15 | 2,604,460 | 3/14/2023 | |
6.0.14 | 2,859,115 | 2/14/2023 | |
6.0.13 | 4,683,173 | 1/10/2023 | |
6.0.12 | 4,345,260 | 12/13/2022 | |
6.0.11 | 6,293,450 | 11/7/2022 | |
6.0.10 | 9,081,662 | 10/11/2022 | |
6.0.9 | 6,465,226 | 9/13/2022 | |
6.0.8 | 8,670,576 | 8/9/2022 | |
6.0.7 | 6,968,502 | 7/12/2022 | |
6.0.6 | 5,672,734 | 6/14/2022 | |
6.0.5 | 11,085,768 | 5/10/2022 | |
6.0.4 | 6,472,942 | 4/11/2022 | |
6.0.3 | 7,682,728 | 3/8/2022 | |
6.0.2 | 6,755,230 | 2/8/2022 | |
6.0.1 | 14,384,746 | 12/14/2021 | |
6.0.0 | 14,007,857 | 11/8/2021 | |
6.0.0-rc.2.21480.10 | 70,194 | 10/12/2021 | |
6.0.0-rc.1.21452.15 | 20,819,845 | 9/14/2021 | |
6.0.0-preview.7.21378.6 | 57,136 | 8/10/2021 | |
6.0.0-preview.6.21355.2 | 9,685 | 7/14/2021 | |
6.0.0-preview.5.21301.17 | 5,873 | 6/15/2021 | |
6.0.0-preview.4.21253.5 | 11,122 | 5/24/2021 | |
6.0.0-preview.3.21201.13 | 8,386 | 4/8/2021 | |
6.0.0-preview.2.21154.6 | 6,212 | 3/11/2021 | |
6.0.0-preview.1.21103.6 | 7,609 | 2/12/2021 | |
5.0.17 | 2,132,995 | 5/10/2022 | |
5.0.16 | 294,619 | 4/11/2022 | |
5.0.15 | 696,920 | 3/8/2022 | |
5.0.14 | 514,764 | 2/8/2022 | |
5.0.13 | 2,855,669 | 12/14/2021 | |
5.0.12 | 2,209,110 | 11/7/2021 | |
5.0.11 | 5,078,943 | 10/12/2021 | |
5.0.10 | 6,190,563 | 9/14/2021 | |
5.0.9 | 3,790,648 | 8/10/2021 | |
5.0.8 | 3,559,101 | 7/13/2021 | |
5.0.7 | 3,604,410 | 6/8/2021 | |
5.0.6 | 2,801,620 | 5/11/2021 | |
5.0.5 | 3,863,400 | 4/6/2021 | |
5.0.4 | 2,596,084 | 3/9/2021 | |
5.0.3 | 3,876,634 | 2/9/2021 | |
5.0.2 | 2,491,482 | 1/12/2021 | |
5.0.1 | 2,114,986 | 12/8/2020 | |
5.0.0 | 13,559,645 | 11/9/2020 | |
5.0.0-rc.2.20475.17 | 30,918 | 10/13/2020 | |
5.0.0-rc.1.20451.17 | 20,337 | 9/14/2020 | |
5.0.0-preview.8.20414.8 | 4,551 | 8/25/2020 | |
5.0.0-preview.7.20365.19 | 13,235 | 7/21/2020 | |
5.0.0-preview.6.20312.15 | 6,356 | 6/25/2020 | |
5.0.0-preview.5.20279.2 | 15,560 | 6/10/2020 | |
5.0.0-preview.4.20257.10 | 4,739 | 5/18/2020 | |
5.0.0-preview.3.20215.14 | 4,058 | 4/23/2020 | |
5.0.0-preview.2.20167.3 | 2,585 | 4/2/2020 | |
5.0.0-preview.1.20124.5 | 3,134 | 3/16/2020 | |
3.1.32 | 1,232,043 | 12/13/2022 | |
3.1.31 | 191,400 | 11/8/2022 | |
3.1.30 | 293,010 | 10/11/2022 | |
3.1.29 | 342,906 | 9/13/2022 | |
3.1.28 | 482,949 | 8/9/2022 | |
3.1.27 | 527,919 | 7/12/2022 | |
3.1.26 | 394,710 | 6/14/2022 | |
3.1.25 | 631,427 | 5/10/2022 | |
3.1.24 | 410,838 | 4/11/2022 | |
3.1.23 | 804,079 | 3/8/2022 | |
3.1.22 | 2,987,248 | 12/14/2021 | |
3.1.21 | 1,656,012 | 11/7/2021 | |
3.1.20 | 1,177,823 | 10/11/2021 | |
3.1.19 | 1,234,259 | 9/14/2021 | |
3.1.18 | 1,761,666 | 8/10/2021 | |
3.1.17 | 1,716,138 | 7/13/2021 | |
3.1.16 | 2,221,013 | 6/8/2021 | |
3.1.15 | 1,903,804 | 5/11/2021 | |
3.1.14 | 2,434,362 | 4/6/2021 | |
3.1.13 | 2,866,125 | 3/9/2021 | |
3.1.12 | 2,703,986 | 2/9/2021 | |
3.1.11 | 3,066,945 | 1/12/2021 | |
3.1.10 | 7,001,450 | 11/9/2020 | |
3.1.9 | 7,376,662 | 10/13/2020 | |
3.1.8 | 9,158,694 | 9/8/2020 | |
3.1.7 | 6,404,353 | 8/11/2020 | |
3.1.6 | 7,004,535 | 7/14/2020 | |
3.1.5 | 9,961,991 | 6/9/2020 | |
3.1.4 | 12,038,662 | 5/12/2020 | |
3.1.3 | 12,675,298 | 3/24/2020 | |
3.1.2 | 8,838,804 | 2/18/2020 | |
3.1.1 | 10,407,937 | 1/14/2020 | |
3.1.0 | 9,929,767 | 12/3/2019 | |
3.1.0-preview3.19555.2 | 44,386 | 11/13/2019 | |
3.1.0-preview2.19528.8 | 5,988 | 11/1/2019 | |
3.1.0-preview1.19508.20 | 12,829 | 10/15/2019 | |
3.0.3 | 568,430 | 2/18/2020 | |
3.0.2 | 558,446 | 1/14/2020 | |
3.0.0 | 30,043,087 | 9/23/2019 | |
3.0.0-rc1.19457.4 | 38,247 | 9/16/2019 | |
3.0.0-preview9.19424.4 | 78,712 | 9/4/2019 | |
3.0.0-preview8.19405.7 | 110,936 | 8/13/2019 | |
3.0.0-preview7.19365.7 | 114,583 | 7/23/2019 | |
3.0.0-preview6.19307.2 | 275,183 | 6/12/2019 | |
3.0.0-preview5-19227-01 | 805,413 | 5/6/2019 | |
3.0.0-preview4-19216-03 | 37,681 | 4/18/2019 | |
3.0.0-preview3-19153-02 | 6,092,926 | 3/6/2019 | |
3.0.0-preview-19075-0444 | 22,605 | 1/29/2019 |