Microsoft.AspNetCore.Mvc.NewtonsoftJson 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.
Showing the top 20 packages that depend on Microsoft.AspNetCore.Mvc.NewtonsoftJson.
Packages | Downloads |
---|---|
Quantum.Framework.Core.NetCore
Package Description
|
51 |
Quantum.Framework.Core.NetCore
Package Description
|
52 |
Quantum.Framework.Core.NetCore
Package Description
|
53 |
Quantum.Framework.Core.NetCore
Package Description
|
54 |
Quantum.Framework.Core.NetCore
Package Description
|
56 |
Quantum.Framework.Core.NetCore
Package Description
|
57 |
Quantum.Framework.Core.NetCore
Package Description
|
59 |
Quantum.Framework.Core.NetCore
Package Description
|
60 |
Quantum.Framework.Core.NetCore
Package Description
|
61 |
Quantum.Framework.Core.NetCore
Package Description
|
62 |
Quantum.Framework.Core.NetCore
Package Description
|
67 |
Quantum.Framework.Core.NetCore
Package Description
|
77 |
Quantum.Framework.Core.NetCore
Package Description
|
81 |
Quantum.Framework.Core.NetCore
Package Description
|
119 |
Quantum.Framework.Core.NetCore
Package Description
|
157 |
Quantum.Framework.Core.NetCore
Package Description
|
165 |
.NET 9.0
- Microsoft.AspNetCore.JsonPatch (>= 9.0.0)
- Newtonsoft.Json (>= 13.0.3)
- Newtonsoft.Json.Bson (>= 1.0.2)
Version | Downloads | Last updated |
---|---|---|
9.0.0 | 4 | 11/14/2024 |
9.0.0-rc.2.24474.3 | 5 | 11/22/2024 |
9.0.0-rc.1.24452.1 | 2 | 12/06/2024 |
9.0.0-preview.7.24406.2 | 5 | 12/11/2024 |
9.0.0-preview.6.24328.4 | 3 | 12/08/2024 |
9.0.0-preview.5.24306.11 | 3 | 12/11/2024 |
9.0.0-preview.4.24267.6 | 9 | 05/29/2024 |
9.0.0-preview.3.24172.13 | 3 | 12/19/2024 |
9.0.0-preview.2.24128.4 | 10 | 05/08/2024 |
9.0.0-preview.1.24081.5 | 6 | 11/11/2024 |
8.0.11 | 11 | 11/14/2024 |
8.0.10 | 2 | 12/06/2024 |
8.0.8 | 3 | 11/26/2024 |
8.0.7 | 6 | 11/14/2024 |
8.0.6 | 4 | 12/06/2024 |
8.0.5 | 9 | 05/29/2024 |
8.0.4 | 9 | 05/13/2024 |
8.0.3 | 5 | 11/30/2024 |
8.0.2 | 3 | 11/29/2024 |
8.0.1 | 8 | 02/04/2024 |
8.0.0 | 313 | 12/18/2023 |
8.0.0-rc.2.23480.2 | 7 | 06/03/2024 |
8.0.0-rc.1.23421.29 | 6 | 06/03/2024 |
8.0.0-preview.7.23375.9 | 6 | 11/13/2024 |
8.0.0-preview.6.23329.11 | 30 | 08/08/2023 |
8.0.0-preview.5.23302.2 | 4 | 11/12/2024 |
8.0.0-preview.4.23260.4 | 5 | 05/13/2024 |
8.0.0-preview.3.23177.8 | 6 | 11/14/2024 |
8.0.0-preview.2.23153.2 | 3 | 11/24/2024 |
8.0.0-preview.1.23112.2 | 5 | 12/10/2024 |
7.0.20 | 4 | 11/14/2024 |
7.0.19 | 10 | 06/03/2024 |
7.0.18 | 9 | 05/13/2024 |
7.0.17 | 7 | 06/03/2024 |
7.0.16 | 7 | 05/13/2024 |
7.0.15 | 6 | 10/31/2024 |
7.0.14 | 14 | 02/04/2024 |
7.0.13 | 9 | 06/03/2024 |
7.0.12 | 5 | 06/03/2024 |
7.0.11 | 8 | 05/04/2024 |
7.0.10 | 8 | 05/13/2024 |
7.0.9 | 4 | 12/02/2024 |
7.0.8 | 5 | 11/29/2024 |
7.0.7 | 5 | 05/19/2024 |
7.0.5 | 9 | 04/13/2023 |
7.0.4 | 5 | 11/14/2024 |
7.0.3 | 10 | 07/13/2023 |
7.0.2 | 5 | 11/26/2024 |
7.0.1 | 1 | 12/09/2024 |
7.0.0 | 7 | 05/13/2024 |
7.0.0-rc.2.22476.2 | 9 | 06/03/2024 |
7.0.0-rc.1.22427.2 | 8 | 06/03/2024 |
7.0.0-preview.7.22376.6 | 4 | 12/06/2024 |
7.0.0-preview.6.22330.3 | 8 | 05/13/2024 |
7.0.0-preview.5.22303.8 | 0 | 06/14/2022 |
7.0.0-preview.2.22153.2 | 5 | 11/27/2024 |
6.0.36 | 3 | 11/14/2024 |
6.0.35 | 4 | 11/14/2024 |
6.0.33 | 5 | 11/26/2024 |
6.0.32 | 6 | 11/14/2024 |
6.0.31 | 3 | 11/29/2024 |
6.0.30 | 6 | 06/03/2024 |
6.0.29 | 6 | 06/03/2024 |
6.0.28 | 9 | 06/03/2024 |
6.0.27 | 7 | 06/03/2024 |
6.0.26 | 6 | 06/03/2024 |
6.0.25 | 5 | 06/03/2024 |
6.0.24 | 8 | 06/03/2024 |
6.0.23 | 9 | 06/03/2024 |
6.0.22 | 5 | 06/03/2024 |
6.0.21 | 6 | 06/03/2024 |
6.0.20 | 11 | 06/03/2024 |
6.0.19 | 8 | 06/03/2024 |
6.0.18 | 7 | 06/03/2024 |
6.0.16 | 7 | 06/03/2024 |
6.0.15 | 6 | 06/03/2024 |
6.0.14 | 7 | 03/09/2023 |
6.0.13 | 7 | 02/01/2023 |
6.0.12 | 9 | 09/13/2023 |
6.0.11 | 8 | 06/03/2024 |
6.0.10 | 5 | 06/03/2024 |
6.0.9 | 5 | 11/23/2024 |
6.0.7 | 7 | 05/20/2024 |
6.0.6 | 2 | 12/13/2024 |
6.0.2 | 5 | 11/28/2024 |
6.0.0-rc.2.21480.10 | 2 | 12/06/2024 |
6.0.0-rc.1.21452.15 | 4 | 06/03/2024 |
6.0.0-preview.7.21378.6 | 5 | 12/11/2024 |
6.0.0-preview.6.21355.2 | 4 | 12/11/2024 |
6.0.0-preview.4.21253.5 | 6 | 11/13/2024 |
6.0.0-preview.1.21103.6 | 4 | 11/14/2024 |
5.0.17 | 11 | 07/13/2023 |
5.0.12 | 7 | 06/03/2024 |
5.0.6 | 6 | 11/14/2024 |
5.0.4 | 2 | 12/01/2024 |
5.0.3 | 6 | 11/13/2024 |
5.0.1 | 4 | 11/26/2024 |
5.0.0-rc.2.20475.17 | 9 | 06/03/2024 |
5.0.0-preview.7.20365.19 | 3 | 11/28/2024 |
5.0.0-preview.6.20312.15 | 4 | 11/13/2024 |
5.0.0-preview.5.20279.2 | 3 | 11/27/2024 |
5.0.0-preview.4.20257.10 | 3 | 11/26/2024 |
5.0.0-preview.3.20215.14 | 10 | 05/13/2024 |
5.0.0-preview.1.20124.5 | 4 | 11/14/2024 |
3.1.32 | 9,275 | 05/11/2023 |
3.1.31 | 7 | 06/03/2024 |
3.1.30 | 9 | 10/25/2022 |
3.1.29 | 8 | 06/03/2024 |
3.1.27 | 8 | 06/03/2024 |
3.1.26 | 8 | 06/03/2024 |
3.1.25 | 5 | 06/03/2024 |
3.1.0 | 3 | 11/28/2024 |
3.1.0-preview2.19528.8 | 2 | 12/06/2024 |
3.1.0-preview1.19508.20 | 4 | 11/25/2024 |
3.0.3 | 8 | 05/20/2024 |
3.0.2 | 4 | 11/13/2024 |
3.0.0-rc1.19457.4 | 9 | 06/03/2024 |
3.0.0-preview7.19365.7 | 5 | 11/27/2024 |
3.0.0-preview6.19307.2 | 6 | 11/12/2024 |
3.0.0-preview5-19227-01 | 6 | 11/12/2024 |