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
Ocelot
Ocelot is an API gateway based on .NET stack.
8
Ocelot
Ocelot is an API gateway based on .NET stack.
11
Ocelot
Ocelot is an API Gateway. The project is aimed at people using .NET running a micro services / service orientated architecture that need a unified point of entry into their system. In particular I want easy integration with IdentityServer reference and bearer tokens. reference tokens. Ocelot is a bunch of middlewares in a specific order. Ocelot manipulates the HttpRequest object into a state specified by its configuration until it reaches a request builder middleware where it creates a HttpRequestMessage object which is used to make a request to a downstream service. The middleware that makes the request is the last thing in the Ocelot pipeline. It does not call the next middleware. The response from the downstream service is stored in a per request scoped repository and retrived as the requests goes back up the Ocelot pipeline. There is a piece of middleware that maps the HttpResponseMessage onto the HttpResponse object and that is returned to the client. That is basically it with a bunch of other features.
7
Ocelot
Ocelot is an API Gateway. The project is aimed at people using .NET running a micro services / service orientated architecture that need a unified point of entry into their system. In particular I want easy integration with IdentityServer reference and bearer tokens. reference tokens. Ocelot is a bunch of middlewares in a specific order. Ocelot manipulates the HttpRequest object into a state specified by its configuration until it reaches a request builder middleware where it creates a HttpRequestMessage object which is used to make a request to a downstream service. The middleware that makes the request is the last thing in the Ocelot pipeline. It does not call the next middleware. The response from the downstream service is stored in a per request scoped repository and retrived as the requests goes back up the Ocelot pipeline. There is a piece of middleware that maps the HttpResponseMessage onto the HttpResponse object and that is returned to the client. That is basically it with a bunch of other features.
8
Ocelot
Ocelot is an API Gateway. The project is aimed at people using .NET running a micro services / service orientated architecture that need a unified point of entry into their system. In particular I want easy integration with IdentityServer reference and bearer tokens. reference tokens. Ocelot is a bunch of middlewares in a specific order. Ocelot manipulates the HttpRequest object into a state specified by its configuration until it reaches a request builder middleware where it creates a HttpRequestMessage object which is used to make a request to a downstream service. The middleware that makes the request is the last thing in the Ocelot pipeline. It does not call the next middleware. The response from the downstream service is stored in a per request scoped repository and retrived as the requests goes back up the Ocelot pipeline. There is a piece of middleware that maps the HttpResponseMessage onto the HttpResponse object and that is returned to the client. That is basically it with a bunch of other features.
9
Ocelot
Ocelot is an API Gateway. The project is aimed at people using .NET running a micro services / service orientated architecture that need a unified point of entry into their system. In particular I want easy integration with IdentityServer reference and bearer tokens. reference tokens. Ocelot is a bunch of middlewares in a specific order. Ocelot manipulates the HttpRequest object into a state specified by its configuration until it reaches a request builder middleware where it creates a HttpRequestMessage object which is used to make a request to a downstream service. The middleware that makes the request is the last thing in the Ocelot pipeline. It does not call the next middleware. The response from the downstream service is stored in a per request scoped repository and retrived as the requests goes back up the Ocelot pipeline. There is a piece of middleware that maps the HttpResponseMessage onto the HttpResponse object and that is returned to the client. That is basically it with a bunch of other features.
11
Ocelot
Ocelot is an API Gateway. The project is aimed at people using .NET running a micro services / service orientated architecture that need a unified point of entry into their system. In particular I want easy integration with IdentityServer reference and bearer tokens. reference tokens. Ocelot is a bunch of middlewares in a specific order. Ocelot manipulates the HttpRequest object into a state specified by its configuration until it reaches a request builder middleware where it creates a HttpRequestMessage object which is used to make a request to a downstream service. The middleware that makes the request is the last thing in the Ocelot pipeline. It does not call the next middleware. The response from the downstream service is stored in a per request scoped repository and retrived as the requests goes back up the Ocelot pipeline. There is a piece of middleware that maps the HttpResponseMessage onto the HttpResponse object and that is returned to the client. That is basically it with a bunch of other features.
17
Swashbuckle.AspNetCore.Filters
Some additional useful filters for Swashbuckle.AspNetCore. This package replaces Swashbuckle.AspNetCore.Examples.
7
Swashbuckle.AspNetCore.Filters
Some additional useful filters for Swashbuckle.AspNetCore. This package replaces Swashbuckle.AspNetCore.Examples.
8
Swashbuckle.AspNetCore.SwaggerGen
Swagger Generator for API's built on ASP.NET Core
7
Swashbuckle.AspNetCore.SwaggerGen
Swagger Generator for API's built on ASP.NET Core
8
Swashbuckle.AspNetCore.SwaggerGen
Swagger Generator for API's built on ASP.NET Core
28

Version Downloads Last updated
9.0.0 1 28.11.2024
9.0.0-rc.2.24474.3 0 08.10.2024
9.0.0-rc.1.24452.1 6 22.09.2024
9.0.0-preview.7.24406.2 7 22.09.2024
9.0.0-preview.6.24328.4 6 22.09.2024
9.0.0-preview.5.24306.11 7 22.09.2024
9.0.0-preview.4.24267.6 7 22.09.2024
9.0.0-preview.3.24172.13 6 22.09.2024
9.0.0-preview.2.24128.4 5 22.09.2024
9.0.0-preview.1.24081.5 6 22.09.2024
8.0.11 0 12.11.2024
8.0.10 1 12.12.2024
8.0.8 8 22.09.2024
8.0.7 5 22.09.2024
8.0.6 6 22.09.2024
8.0.5 7 22.09.2024
8.0.4 6 22.09.2024
8.0.3 6 22.09.2024
8.0.2 6 22.09.2024
8.0.1 6 22.09.2024
8.0.0 7 22.09.2024
8.0.0-rc.2.23480.2 6 22.09.2024
8.0.0-rc.1.23421.29 6 22.09.2024
8.0.0-preview.7.23375.9 6 22.09.2024
8.0.0-preview.6.23329.11 6 22.09.2024
8.0.0-preview.5.23302.2 7 22.09.2024
8.0.0-preview.4.23260.4 7 22.09.2024
8.0.0-preview.3.23177.8 7 22.09.2024
8.0.0-preview.2.23153.2 6 22.09.2024
8.0.0-preview.1.23112.2 6 22.09.2024
7.0.20 6 22.09.2024
7.0.19 7 22.09.2024
7.0.18 7 22.09.2024
7.0.17 6 22.09.2024
7.0.16 7 22.09.2024
7.0.15 6 22.09.2024
7.0.14 6 22.09.2024
7.0.13 6 22.09.2024
7.0.12 6 22.09.2024
7.0.11 7 22.09.2024
7.0.10 6 22.09.2024
7.0.9 6 22.09.2024
7.0.8 6 22.09.2024
7.0.7 6 22.09.2024
7.0.5 6 22.09.2024
7.0.4 8 22.09.2024
7.0.3 6 22.09.2024
7.0.2 6 22.09.2024
7.0.1 6 22.09.2024
7.0.0 6 22.09.2024
7.0.0-rc.2.22476.2 7 22.09.2024
7.0.0-rc.1.22427.2 6 22.09.2024
7.0.0-preview.7.22376.6 6 22.09.2024
7.0.0-preview.6.22330.3 6 22.09.2024
7.0.0-preview.5.22303.8 6 22.09.2024
7.0.0-preview.4.22251.1 6 22.09.2024
7.0.0-preview.3.22178.4 7 22.09.2024
7.0.0-preview.2.22153.2 7 22.09.2024
7.0.0-preview.1.22109.13 7 22.09.2024
6.0.36 0 12.11.2024
6.0.35 0 08.10.2024
6.0.33 8 22.09.2024
6.0.32 6 22.09.2024
6.0.31 7 22.09.2024
6.0.30 6 22.09.2024
6.0.29 6 22.09.2024
6.0.28 7 22.09.2024
6.0.27 7 22.09.2024
6.0.26 5 22.09.2024
6.0.25 6 22.09.2024
6.0.24 7 22.09.2024
6.0.23 6 22.09.2024
6.0.22 7 22.09.2024
6.0.21 7 22.09.2024
6.0.20 7 22.09.2024
6.0.19 7 22.09.2024
6.0.18 7 22.09.2024
6.0.16 8 04.03.2024
6.0.15 5 22.09.2024
6.0.14 6 22.09.2024
6.0.13 7 22.09.2024
6.0.12 7 22.09.2024
6.0.11 6 22.09.2024
6.0.10 6 22.09.2024
6.0.9 5 22.09.2024
6.0.8 6 22.09.2024
6.0.7 6 22.09.2024
6.0.6 6 22.09.2024
6.0.5 6 22.09.2024
6.0.4 5 22.09.2024
6.0.3 6 22.09.2024
6.0.2 6 22.09.2024
6.0.1 6 22.09.2024
6.0.0 6 22.09.2024
6.0.0-rc.2.21480.10 6 22.09.2024
6.0.0-rc.1.21452.15 6 22.09.2024
6.0.0-preview.7.21378.6 7 22.09.2024
6.0.0-preview.6.21355.2 7 22.09.2024
6.0.0-preview.5.21301.17 6 22.09.2024
6.0.0-preview.4.21253.5 7 22.09.2024
6.0.0-preview.3.21201.13 7 22.09.2024
6.0.0-preview.2.21154.6 7 22.09.2024
6.0.0-preview.1.21103.6 6 22.09.2024
5.0.17 11 22.09.2024
5.0.16 6 22.09.2024
5.0.15 7 22.09.2024
5.0.14 6 22.09.2024
5.0.13 6 22.09.2024
5.0.12 6 22.09.2024
5.0.11 6 22.09.2024
5.0.10 7 22.09.2024
5.0.9 6 22.09.2024
5.0.8 7 22.09.2024
5.0.7 6 22.09.2024
5.0.6 7 22.09.2024
5.0.5 7 22.09.2024
5.0.4 6 22.09.2024
5.0.3 6 22.09.2024
5.0.2 6 22.09.2024
5.0.1 5 22.09.2024
5.0.0 7 24.07.2024
5.0.0-rc.2.20475.17 6 22.09.2024
5.0.0-rc.1.20451.17 7 22.09.2024
5.0.0-preview.8.20414.8 6 22.09.2024
5.0.0-preview.7.20365.19 6 22.09.2024
5.0.0-preview.6.20312.15 6 22.09.2024
5.0.0-preview.5.20279.2 7 22.09.2024
5.0.0-preview.4.20257.10 6 22.09.2024
5.0.0-preview.3.20215.14 6 22.09.2024
5.0.0-preview.2.20167.3 7 22.09.2024
5.0.0-preview.1.20124.5 6 22.09.2024
3.1.32 6 22.09.2024
3.1.31 6 22.09.2024
3.1.30 7 22.09.2024
3.1.29 6 22.09.2024
3.1.28 7 22.09.2024
3.1.27 6 22.09.2024
3.1.26 6 22.09.2024
3.1.25 7 22.09.2024
3.1.24 6 22.09.2024
3.1.23 6 22.09.2024
3.1.22 6 22.09.2024
3.1.21 6 22.09.2024
3.1.20 7 22.09.2024
3.1.19 6 22.09.2024
3.1.18 7 22.09.2024
3.1.17 6 22.09.2024
3.1.16 5 22.09.2024
3.1.15 6 22.09.2024
3.1.14 14 15.02.2024
3.1.13 6 22.09.2024
3.1.12 6 22.09.2024
3.1.11 7 22.09.2024
3.1.10 6 22.09.2024
3.1.9 7 22.09.2024
3.1.8 6 22.09.2024
3.1.7 8 22.09.2024
3.1.6 7 22.09.2024
3.1.5 7 22.09.2024
3.1.4 7 22.09.2024
3.1.3 7 22.09.2024
3.1.2 7 22.09.2024
3.1.1 6 22.09.2024
3.1.0 6 22.09.2024
3.1.0-preview3.19555.2 7 22.09.2024
3.1.0-preview2.19528.8 5 22.09.2024
3.1.0-preview1.19508.20 7 22.09.2024
3.0.3 6 22.09.2024
3.0.2 6 22.09.2024
3.0.0 12 01.03.2024
3.0.0-rc1.19457.4 7 22.09.2024
3.0.0-preview9.19424.4 6 22.09.2024
3.0.0-preview8.19405.7 6 22.09.2024
3.0.0-preview7.19365.7 7 22.09.2024
3.0.0-preview6.19307.2 6 22.09.2024
3.0.0-preview5-19227-01 6 22.09.2024
3.0.0-preview4-19216-03 6 22.09.2024
3.0.0-preview3-19153-02 34 01.03.2024
3.0.0-preview-19075-0444 5 22.09.2024