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 | 11,196 | 11/12/2024 | |
9.0.0-rc.2.24474.3 | 8,923 | 10/8/2024 | |
9.0.0-rc.1.24452.1 | 9,185 | 9/10/2024 | |
9.0.0-preview.7.24406.2 | 4,731 | 8/13/2024 | |
9.0.0-preview.6.24328.4 | 14,598 | 7/9/2024 | |
9.0.0-preview.5.24306.11 | 1,924 | 6/11/2024 | |
9.0.0-preview.4.24267.6 | 2,082 | 5/21/2024 | |
9.0.0-preview.3.24172.13 | 4,167 | 4/11/2024 | |
9.0.0-preview.2.24128.4 | 4,315 | 3/12/2024 | |
9.0.0-preview.1.24081.5 | 3,844 | 2/13/2024 | |
8.0.11 | 26,679 | 11/12/2024 | |
8.0.10 | 1,634,700 | 10/8/2024 | |
8.0.8 | 4,158,940 | 8/13/2024 | |
8.0.7 | 3,370,474 | 7/9/2024 | |
8.0.6 | 3,824,984 | 5/28/2024 | |
8.0.5 | 1,398,402 | 5/14/2024 | |
8.0.4 | 3,838,086 | 4/9/2024 | |
8.0.3 | 3,108,131 | 3/12/2024 | |
8.0.2 | 3,182,015 | 2/13/2024 | |
8.0.1 | 4,805,219 | 1/9/2024 | |
8.0.0 | 8,661,833 | 11/14/2023 | |
8.0.0-rc.2.23480.2 | 54,404 | 10/10/2023 | |
8.0.0-rc.1.23421.29 | 27,696 | 9/12/2023 | |
8.0.0-preview.7.23375.9 | 14,899 | 8/8/2023 | |
8.0.0-preview.6.23329.11 | 8,909 | 7/11/2023 | |
8.0.0-preview.5.23302.2 | 6,572 | 6/13/2023 | |
8.0.0-preview.4.23260.4 | 185,003 | 5/16/2023 | |
8.0.0-preview.3.23177.8 | 18,483 | 4/11/2023 | |
8.0.0-preview.2.23153.2 | 8,952 | 3/14/2023 | |
8.0.0-preview.1.23112.2 | 15,028 | 2/21/2023 | |
7.0.20 | 278,825 | 5/28/2024 | |
7.0.19 | 96,018 | 5/14/2024 | |
7.0.18 | 158,415 | 4/9/2024 | |
7.0.17 | 200,452 | 3/12/2024 | |
7.0.16 | 313,705 | 2/13/2024 | |
7.0.15 | 565,332 | 1/9/2024 | |
7.0.14 | 1,266,342 | 11/14/2023 | |
7.0.13 | 1,549,658 | 10/24/2023 | |
7.0.12 | 896,666 | 10/10/2023 | |
7.0.11 | 1,429,260 | 9/12/2023 | |
7.0.10 | 2,100,960 | 8/8/2023 | |
7.0.9 | 1,537,146 | 7/11/2023 | |
7.0.8 | 1,302,046 | 6/22/2023 | |
7.0.7 | 1,126,361 | 6/13/2023 | |
7.0.5 | 4,987,351 | 4/11/2023 | |
7.0.4 | 1,990,800 | 3/14/2023 | |
7.0.3 | 2,178,494 | 2/14/2023 | |
7.0.2 | 3,027,477 | 1/10/2023 | |
7.0.1 | 2,763,590 | 12/13/2022 | |
7.0.0 | 11,124,396 | 11/7/2022 | |
7.0.0-rc.2.22476.2 | 62,325 | 10/11/2022 | |
7.0.0-rc.1.22427.2 | 9,749 | 9/14/2022 | |
7.0.0-preview.7.22376.6 | 9,964 | 8/9/2022 | |
7.0.0-preview.6.22330.3 | 7,592 | 7/12/2022 | |
7.0.0-preview.5.22303.8 | 8,713 | 6/14/2022 | |
7.0.0-preview.4.22251.1 | 8,830 | 5/10/2022 | |
7.0.0-preview.3.22178.4 | 3,255 | 4/13/2022 | |
7.0.0-preview.2.22153.2 | 10,393 | 3/14/2022 | |
7.0.0-preview.1.22109.13 | 3,313 | 2/17/2022 | |
6.0.36 | 6,150 | 11/12/2024 | |
6.0.35 | 98,706 | 10/8/2024 | |
6.0.33 | 524,275 | 8/13/2024 | |
6.0.32 | 387,520 | 7/9/2024 | |
6.0.31 | 487,631 | 5/28/2024 | |
6.0.30 | 188,256 | 5/14/2024 | |
6.0.29 | 650,680 | 4/9/2024 | |
6.0.28 | 688,294 | 3/12/2024 | |
6.0.27 | 1,966,631 | 2/13/2024 | |
6.0.26 | 1,333,968 | 1/9/2024 | |
6.0.25 | 2,548,371 | 11/14/2023 | |
6.0.24 | 1,437,948 | 10/24/2023 | |
6.0.23 | 732,390 | 10/10/2023 | |
6.0.22 | 1,418,629 | 9/12/2023 | |
6.0.21 | 1,934,829 | 8/8/2023 | |
6.0.20 | 2,012,665 | 7/11/2023 | |
6.0.19 | 1,178,433 | 6/22/2023 | |
6.0.18 | 697,648 | 6/13/2023 | |
6.0.16 | 5,328,243 | 4/11/2023 | |
6.0.15 | 2,582,936 | 3/14/2023 | |
6.0.14 | 2,839,618 | 2/14/2023 | |
6.0.13 | 4,647,137 | 1/10/2023 | |
6.0.12 | 4,323,778 | 12/13/2022 | |
6.0.11 | 6,241,934 | 11/7/2022 | |
6.0.10 | 9,035,223 | 10/11/2022 | |
6.0.9 | 6,430,661 | 9/13/2022 | |
6.0.8 | 8,617,973 | 8/9/2022 | |
6.0.7 | 6,939,612 | 7/12/2022 | |
6.0.6 | 5,641,166 | 6/14/2022 | |
6.0.5 | 11,030,820 | 5/10/2022 | |
6.0.4 | 6,446,037 | 4/11/2022 | |
6.0.3 | 7,660,230 | 3/8/2022 | |
6.0.2 | 6,737,516 | 2/8/2022 | |
6.0.1 | 14,308,246 | 12/14/2021 | |
6.0.0 | 13,906,775 | 11/8/2021 | |
6.0.0-rc.2.21480.10 | 70,098 | 10/12/2021 | |
6.0.0-rc.1.21452.15 | 20,676,957 | 9/14/2021 | |
6.0.0-preview.7.21378.6 | 56,362 | 8/10/2021 | |
6.0.0-preview.6.21355.2 | 9,673 | 7/14/2021 | |
6.0.0-preview.5.21301.17 | 5,862 | 6/15/2021 | |
6.0.0-preview.4.21253.5 | 11,110 | 5/24/2021 | |
6.0.0-preview.3.21201.13 | 8,370 | 4/8/2021 | |
6.0.0-preview.2.21154.6 | 6,202 | 3/11/2021 | |
6.0.0-preview.1.21103.6 | 7,597 | 2/12/2021 | |
5.0.17 | 2,121,024 | 5/10/2022 | |
5.0.16 | 293,405 | 4/11/2022 | |
5.0.15 | 694,065 | 3/8/2022 | |
5.0.14 | 512,922 | 2/8/2022 | |
5.0.13 | 2,850,351 | 12/14/2021 | |
5.0.12 | 2,204,293 | 11/7/2021 | |
5.0.11 | 5,070,918 | 10/12/2021 | |
5.0.10 | 6,178,460 | 9/14/2021 | |
5.0.9 | 3,781,259 | 8/10/2021 | |
5.0.8 | 3,552,115 | 7/13/2021 | |
5.0.7 | 3,597,530 | 6/8/2021 | |
5.0.6 | 2,797,364 | 5/11/2021 | |
5.0.5 | 3,857,371 | 4/6/2021 | |
5.0.4 | 2,590,433 | 3/9/2021 | |
5.0.3 | 3,869,622 | 2/9/2021 | |
5.0.2 | 2,486,097 | 1/12/2021 | |
5.0.1 | 2,112,427 | 12/8/2020 | |
5.0.0 | 13,512,179 | 11/9/2020 | |
5.0.0-rc.2.20475.17 | 30,887 | 10/13/2020 | |
5.0.0-rc.1.20451.17 | 20,303 | 9/14/2020 | |
5.0.0-preview.8.20414.8 | 4,541 | 8/25/2020 | |
5.0.0-preview.7.20365.19 | 13,221 | 7/21/2020 | |
5.0.0-preview.6.20312.15 | 6,345 | 6/25/2020 | |
5.0.0-preview.5.20279.2 | 15,550 | 6/10/2020 | |
5.0.0-preview.4.20257.10 | 4,729 | 5/18/2020 | |
5.0.0-preview.3.20215.14 | 4,046 | 4/23/2020 | |
5.0.0-preview.2.20167.3 | 2,575 | 4/2/2020 | |
5.0.0-preview.1.20124.5 | 3,122 | 3/16/2020 | |
3.1.32 | 1,218,109 | 12/13/2022 | |
3.1.31 | 190,097 | 11/8/2022 | |
3.1.30 | 291,059 | 10/11/2022 | |
3.1.29 | 337,764 | 9/13/2022 | |
3.1.28 | 480,289 | 8/9/2022 | |
3.1.27 | 526,340 | 7/12/2022 | |
3.1.26 | 393,257 | 6/14/2022 | |
3.1.25 | 629,232 | 5/10/2022 | |
3.1.24 | 410,156 | 4/11/2022 | |
3.1.23 | 801,886 | 3/8/2022 | |
3.1.22 | 2,969,831 | 12/14/2021 | |
3.1.21 | 1,650,503 | 11/7/2021 | |
3.1.20 | 1,175,188 | 10/11/2021 | |
3.1.19 | 1,231,673 | 9/14/2021 | |
3.1.18 | 1,756,228 | 8/10/2021 | |
3.1.17 | 1,710,224 | 7/13/2021 | |
3.1.16 | 2,215,908 | 6/8/2021 | |
3.1.15 | 1,898,091 | 5/11/2021 | |
3.1.14 | 2,424,761 | 4/6/2021 | |
3.1.13 | 2,862,000 | 3/9/2021 | |
3.1.12 | 2,696,122 | 2/9/2021 | |
3.1.11 | 3,060,084 | 1/12/2021 | |
3.1.10 | 6,989,093 | 11/9/2020 | |
3.1.9 | 7,362,473 | 10/13/2020 | |
3.1.8 | 9,146,917 | 9/8/2020 | |
3.1.7 | 6,395,396 | 8/11/2020 | |
3.1.6 | 6,989,803 | 7/14/2020 | |
3.1.5 | 9,950,317 | 6/9/2020 | |
3.1.4 | 12,025,420 | 5/12/2020 | |
3.1.3 | 12,653,892 | 3/24/2020 | |
3.1.2 | 8,824,250 | 2/18/2020 | |
3.1.1 | 10,382,675 | 1/14/2020 | |
3.1.0 | 9,907,804 | 12/3/2019 | |
3.1.0-preview3.19555.2 | 44,362 | 11/13/2019 | |
3.1.0-preview2.19528.8 | 5,978 | 11/1/2019 | |
3.1.0-preview1.19508.20 | 12,803 | 10/15/2019 | |
3.0.3 | 567,107 | 2/18/2020 | |
3.0.2 | 556,933 | 1/14/2020 | |
3.0.0 | 29,968,853 | 9/23/2019 | |
3.0.0-rc1.19457.4 | 38,136 | 9/16/2019 | |
3.0.0-preview9.19424.4 | 78,677 | 9/4/2019 | |
3.0.0-preview8.19405.7 | 110,845 | 8/13/2019 | |
3.0.0-preview7.19365.7 | 114,543 | 7/23/2019 | |
3.0.0-preview6.19307.2 | 275,091 | 6/12/2019 | |
3.0.0-preview5-19227-01 | 804,098 | 5/6/2019 | |
3.0.0-preview4-19216-03 | 37,597 | 4/18/2019 | |
3.0.0-preview3-19153-02 | 6,083,086 | 3/6/2019 | |
3.0.0-preview-19075-0444 | 22,583 | 1/29/2019 |