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 |
---|---|
Swashbuckle.AspNetCore.SwaggerGen
Swagger Generator for API's built on ASP.NET Core
|
42 |
Swashbuckle.AspNetCore.SwaggerGen
Swagger Generator for API's built on ASP.NET Core
|
43 |
Swashbuckle.AspNetCore.SwaggerGen
Swagger Generator for API's built on ASP.NET Core
|
54 |
Swashbuckle.AspNetCore.SwaggerGen
Swagger Generator for API's built on ASP.NET Core
|
107 |
TNE.Common
Package Description
|
10,161 |
.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 | 5 | 11/15/2024 |
9.0.0-rc.2.24474.3 | 6 | 10/12/2024 |
9.0.0-rc.1.24452.1 | 9 | 09/14/2024 |
9.0.0-preview.7.24406.2 | 11 | 08/16/2024 |
9.0.0-preview.6.24328.4 | 15 | 07/15/2024 |
9.0.0-preview.5.24306.11 | 11 | 06/16/2024 |
9.0.0-preview.4.24267.6 | 12 | 05/22/2024 |
9.0.0-preview.3.24172.13 | 18 | 04/21/2024 |
9.0.0-preview.2.24128.4 | 15 | 03/14/2024 |
9.0.0-preview.1.24081.5 | 16 | 02/19/2024 |
8.0.11 | 4 | 11/15/2024 |
8.0.10 | 6 | 10/10/2024 |
8.0.8 | 9 | 08/15/2024 |
8.0.7 | 7 | 07/15/2024 |
8.0.6 | 10 | 05/29/2024 |
8.0.5 | 8 | 05/22/2024 |
8.0.4 | 10 | 04/21/2024 |
8.0.3 | 11 | 03/14/2024 |
8.0.2 | 10 | 02/20/2024 |
8.0.1 | 14 | 01/22/2024 |
8.0.0 | 25 | 11/16/2023 |
8.0.0-rc.2.23480.2 | 18 | 10/19/2023 |
8.0.0-rc.1.23421.29 | 21 | 09/25/2023 |
8.0.0-preview.7.23375.9 | 22 | 09/13/2023 |
8.0.0-preview.6.23329.11 | 21 | 09/16/2023 |
8.0.0-preview.5.23302.2 | 21 | 06/29/2023 |
8.0.0-preview.4.23260.4 | 23 | 06/06/2023 |
8.0.0-preview.3.23177.8 | 18 | 05/31/2023 |
8.0.0-preview.2.23153.2 | 25 | 09/29/2023 |
8.0.0-preview.1.23112.2 | 20 | 09/21/2023 |
7.0.20 | 8 | 05/29/2024 |
7.0.19 | 17 | 05/22/2024 |
7.0.18 | 14 | 04/21/2024 |
7.0.17 | 9 | 03/15/2024 |
7.0.16 | 13 | 02/19/2024 |
7.0.15 | 13 | 01/22/2024 |
7.0.14 | 21 | 11/16/2023 |
7.0.13 | 17 | 10/25/2023 |
7.0.12 | 27 | 10/19/2023 |
7.0.11 | 17 | 09/19/2023 |
7.0.10 | 21 | 09/23/2023 |
7.0.9 | 20 | 09/15/2023 |
7.0.8 | 20 | 09/15/2023 |
7.0.7 | 22 | 09/06/2023 |
7.0.5 | 20 | 09/17/2023 |
7.0.4 | 25 | 08/09/2023 |
7.0.3 | 16 | 09/02/2023 |
7.0.2 | 19 | 09/15/2023 |
7.0.1 | 17 | 09/21/2023 |
7.0.0 | 22 | 06/28/2023 |
7.0.0-rc.2.22476.2 | 22 | 10/17/2022 |
7.0.0-rc.1.22427.2 | 27 | 09/24/2022 |
7.0.0-preview.7.22376.6 | 22 | 09/22/2022 |
7.0.0-preview.6.22330.3 | 26 | 09/23/2022 |
7.0.0-preview.5.22303.8 | 24 | 10/19/2022 |
7.0.0-preview.4.22251.1 | 18 | 10/19/2022 |
7.0.0-preview.3.22178.4 | 23 | 09/23/2022 |
7.0.0-preview.2.22153.2 | 23 | 10/19/2022 |
7.0.0-preview.1.22109.13 | 20 | 10/19/2022 |
6.0.36 | 5 | 11/15/2024 |
6.0.35 | 6 | 10/11/2024 |
6.0.33 | 9 | 08/16/2024 |
6.0.32 | 10 | 07/15/2024 |
6.0.31 | 12 | 05/29/2024 |
6.0.30 | 11 | 05/22/2024 |
6.0.29 | 14 | 04/21/2024 |
6.0.28 | 12 | 03/14/2024 |
6.0.27 | 13 | 02/20/2024 |
6.0.26 | 16 | 01/22/2024 |
6.0.25 | 29 | 11/15/2023 |
6.0.24 | 15 | 10/26/2023 |
6.0.23 | 23 | 10/19/2023 |
6.0.22 | 21 | 09/26/2023 |
6.0.21 | 19 | 09/23/2023 |
6.0.20 | 21 | 09/12/2023 |
6.0.19 | 16 | 09/13/2023 |
6.0.18 | 18 | 09/12/2023 |
6.0.16 | 19 | 08/18/2023 |
6.0.15 | 24 | 09/22/2023 |
6.0.14 | 14 | 07/21/2023 |
6.0.13 | 19 | 09/12/2023 |
6.0.12 | 20 | 09/23/2023 |
6.0.11 | 12 | 09/23/2023 |
6.0.10 | 18 | 10/19/2022 |
6.0.9 | 20 | 09/23/2022 |
6.0.8 | 24 | 09/23/2022 |
6.0.7 | 20 | 09/22/2022 |
6.0.6 | 18 | 09/27/2022 |
6.0.5 | 23 | 09/24/2022 |
6.0.4 | 20 | 09/24/2022 |
6.0.3 | 24 | 09/24/2022 |
6.0.2 | 22 | 06/27/2022 |
6.0.1 | 17 | 09/26/2022 |
6.0.0 | 21 | 10/19/2022 |
6.0.0-rc.2.21480.10 | 27 | 09/24/2022 |
6.0.0-rc.1.21452.15 | 27 | 07/28/2022 |
6.0.0-preview.7.21378.6 | 21 | 09/23/2022 |
6.0.0-preview.6.21355.2 | 22 | 09/21/2022 |
6.0.0-preview.5.21301.17 | 25 | 09/26/2022 |
6.0.0-preview.4.21253.5 | 22 | 10/19/2022 |
6.0.0-preview.3.21201.13 | 24 | 09/22/2022 |
6.0.0-preview.2.21154.6 | 27 | 09/25/2022 |
6.0.0-preview.1.21103.6 | 21 | 09/25/2022 |
5.0.17 | 22 | 08/04/2022 |
5.0.16 | 20 | 10/19/2022 |
5.0.15 | 26 | 09/24/2022 |
5.0.14 | 24 | 06/27/2022 |
5.0.13 | 21 | 09/23/2022 |
5.0.12 | 24 | 10/19/2022 |
5.0.11 | 26 | 09/22/2022 |
5.0.10 | 24 | 09/21/2022 |
5.0.9 | 36 | 07/03/2022 |
5.0.8 | 23 | 10/19/2022 |
5.0.7 | 16 | 09/22/2022 |
5.0.6 | 23 | 09/25/2022 |
5.0.5 | 23 | 09/24/2022 |
5.0.4 | 25 | 09/22/2022 |
5.0.3 | 25 | 09/23/2022 |
5.0.2 | 27 | 09/22/2022 |
5.0.1 | 29 | 07/22/2022 |
5.0.0 | 22 | 09/26/2022 |
5.0.0-rc.2.20475.17 | 23 | 09/23/2022 |
5.0.0-rc.1.20451.17 | 20 | 09/25/2022 |
5.0.0-preview.8.20414.8 | 24 | 09/24/2022 |
5.0.0-preview.7.20365.19 | 22 | 10/19/2022 |
5.0.0-preview.6.20312.15 | 25 | 09/22/2022 |
5.0.0-preview.5.20279.2 | 26 | 09/23/2022 |
5.0.0-preview.4.20257.10 | 20 | 09/26/2022 |
5.0.0-preview.3.20215.14 | 23 | 09/22/2022 |
5.0.0-preview.2.20167.3 | 26 | 09/24/2022 |
5.0.0-preview.1.20124.5 | 23 | 10/19/2022 |
3.1.32 | 23 | 10/01/2023 |
3.1.31 | 19 | 08/18/2023 |
3.1.30 | 22 | 10/19/2022 |
3.1.29 | 38 | 09/22/2022 |
3.1.28 | 24 | 09/21/2022 |
3.1.27 | 20 | 09/23/2022 |
3.1.26 | 22 | 10/19/2022 |
3.1.25 | 22 | 09/23/2022 |
3.1.24 | 28 | 10/19/2022 |
3.1.23 | 26 | 09/27/2022 |
3.1.22 | 25 | 09/22/2022 |
3.1.21 | 19 | 09/22/2022 |
3.1.20 | 19 | 09/26/2022 |
3.1.19 | 21 | 09/25/2022 |
3.1.18 | 25 | 09/23/2022 |
3.1.17 | 21 | 10/19/2022 |
3.1.16 | 22 | 09/24/2022 |
3.1.15 | 20 | 09/24/2022 |
3.1.14 | 25 | 09/24/2022 |
3.1.13 | 24 | 09/24/2022 |
3.1.12 | 21 | 09/21/2022 |
3.1.11 | 27 | 09/21/2022 |
3.1.10 | 20 | 09/24/2022 |
3.1.9 | 21 | 10/19/2022 |
3.1.8 | 29 | 09/21/2022 |
3.1.7 | 22 | 09/25/2022 |
3.1.6 | 24 | 10/19/2022 |
3.1.5 | 10,126 | 06/27/2022 |
3.1.4 | 11 | 09/22/2022 |
3.1.3 | 24 | 09/24/2022 |
3.1.2 | 21 | 10/19/2022 |
3.1.1 | 27 | 09/22/2022 |
3.1.0 | 17 | 09/23/2022 |
3.1.0-preview3.19555.2 | 27 | 09/23/2022 |
3.1.0-preview2.19528.8 | 22 | 10/19/2022 |
3.1.0-preview1.19508.20 | 26 | 09/22/2022 |
3.0.3 | 15 | 10/19/2022 |
3.0.2 | 23 | 09/23/2022 |
3.0.0 | 18 | 09/24/2022 |
3.0.0-rc1.19457.4 | 23 | 09/23/2022 |
3.0.0-preview9.19424.4 | 23 | 09/22/2022 |
3.0.0-preview8.19405.7 | 19 | 09/22/2022 |
3.0.0-preview7.19365.7 | 27 | 09/21/2022 |
3.0.0-preview6.19307.2 | 26 | 09/24/2022 |
3.0.0-preview5-19227-01 | 26 | 09/24/2022 |
3.0.0-preview4-19216-03 | 26 | 09/23/2022 |
3.0.0-preview3-19153-02 | 24 | 09/22/2022 |
3.0.0-preview-19075-0444 | 19 | 10/19/2022 |