Table of Contents

Namespace Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json

Assembly: Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.dll

Register JSON formatters for ASP.NET Core MVC based on System.Text.Json with a single extension method call. Use this namespace when you need System.Text.Json formatters in your MVC pipeline. Start with AddJsonFormatters on IMvcBuilder or IMvcCoreBuilder to enable JSON serialization in your controllers.

Availability: .NET 10 and .NET 9

Complements: Cuemon.Extensions.Text.Json namespace 📘

Extension Members

Type Ext Methods
HttpExceptionDescriptorResponseHandler ⬇️ AddJsonResponseHandler
IMvcBuilder ⬇️ AddJsonFormatters, AddJsonFormattersOptions
IMvcCoreBuilder ⬇️ AddJsonFormatters, AddJsonFormattersOptions

Classes

JsonSerializationInputFormatter

This class handles deserialization of JSON to objects using JsonFormatter.

JsonSerializationMvcOptionsSetup

A ConfigureOptions<TOptions> implementation which will add the JSON serializer formatters to MvcOptions.

JsonSerializationOutputFormatter

This class handles serialization of objects to JSON using JsonFormatter.

MvcBuilderExtensions

Extension methods for the IMvcBuilder interface.

MvcCoreBuilderExtensions

Extension methods for the IMvcCoreBuilder interface.