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

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
VisionFramework.Core
Package Description
575
VisionFramework.Core
Package Description
573
VisionFramework.Core
Package Description
436
VisionFramework.Core
Package Description
400
VisionFramework.ApiAuthorization
Package Description
318
VisionFramework.ApiAuthorization
Package Description
252
VisionFramework.ApiAuthorization
Package Description
245
VisionFramework.Core
Package Description
219
VisionFramework.ApiAuthorization
Package Description
215
VisionFramework.ApiAuthorization
Package Description
208
VisionFramework.Core
Package Description
192
VisionFramework.ApiAuthorization
Package Description
166
VisionFramework.Core
Package Description
161
VisionFramework.ApiAuthorization
Package Description
146
VisionFramework.Core
Package Description
136
VisionFramework.ApiAuthorization
Package Description
134
VisionFramework.Core
Package Description
124
VisionFramework.ApiAuthorization
Package Description
80
VisionFramework.ApiAuthorization
Package Description
77
VisionFramework.ApiAuthorization
Package Description
69

.NET 10.0

Version Downloads Last updated
10.0.0-preview.6.25358.103 39 07/24/2025
9.0.7 36 07/14/2025
9.0.4 34 07/08/2025
9.0.3 35 07/07/2025
9.0.2 35 07/11/2025
9.0.1 34 07/08/2025
9.0.0 33 07/08/2025
9.0.0-preview.4.24267.6 26 07/10/2025
9.0.0-preview.1.24081.5 33 07/10/2025
8.0.18 32 07/17/2025
8.0.10 34 07/08/2025
8.0.8 41 08/02/2025
8.0.7 88 07/07/2025
8.0.0-preview.2.23153.2 30 07/09/2025
7.0.0-preview.5.22303.8 24 07/10/2025
7.0.0-preview.4.22251.1 30 08/08/2025
7.0.0-preview.2.22153.2 34 07/10/2025
6.0.36 33 07/11/2025
6.0.29 32 07/08/2025
6.0.26 32 08/08/2025
6.0.25 26 07/08/2025
6.0.18 30 07/12/2025
6.0.10 31 07/11/2025
6.0.8 32 08/08/2025
6.0.2 34 07/11/2025
6.0.0-preview.6.21355.2 30 07/09/2025
5.0.0-preview.7.20365.19 30 07/09/2025
3.1.29 28 07/09/2025
3.1.28 29 07/10/2025
3.1.21 38 08/08/2025
3.1.8 30 07/08/2025
3.1.4 27 07/11/2025
3.1.0 32 07/11/2025
3.0.3 32 07/12/2025
3.0.0-rc1.19457.4 29 07/11/2025