Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Class JsonFormatterOptions

Options for configuring IJsonOutputFormatter and IJsonInputFormatter

Inheritance
System.Object
JsonFormatterOptions
Namespace: EPiServer.Formatters
Assembly: EPiServer.Cms.AspNetCore.dll
Version: 12.0.3
Syntax
[Options(ConfigurationSection = "Cms")]
public class JsonFormatterOptions : Object

Constructors

JsonFormatterOptions()

Declaration
public JsonFormatterOptions()

Properties

AssemblyModuleInputFormatters

All registered IJsonInputFormatter for assemblies

Declaration
public IDictionary<Assembly, FormatterRegistration> AssemblyModuleInputFormatters { get; }
Property Value
Type Description
System.Collections.Generic.IDictionary<System.Reflection.Assembly, FormatterRegistration>
Remarks

The option will not register any model binders for request bodies. One option can be to register a custom Microsoft.AspNetCore.Mvc.ApplicationModels.IApplicationModelConvention to register model binders

AssemblyModuleOutputFormatters

All registered IJsonOutputFormatter for assemblies

Declaration
public IDictionary<Assembly, FormatterRegistration> AssemblyModuleOutputFormatters { get; }
Property Value
Type Description
System.Collections.Generic.IDictionary<System.Reflection.Assembly, FormatterRegistration>
Remarks

The option will not register any model binders for request bodies. One option can be to register a custom Microsoft.AspNetCore.Mvc.ApplicationModels.IApplicationModelConvention to register model binders

FallbackFormatterType

Defines the fallback formatter to use when no assembly or type registration applies

Declaration
public FormatterType FallbackFormatterType { get; set; }
Property Value
Type Description
FormatterType
Remarks

Default value is Newtonsoft

TypeModuleInputFormatters

All registered IJsonInputFormatter for types

Declaration
public IDictionary<Type, FormatterRegistration> TypeModuleInputFormatters { get; }
Property Value
Type Description
System.Collections.Generic.IDictionary<System.Type, FormatterRegistration>
Remarks

The option will not register any model binders for request bodies. One option can be to register a custom Microsoft.AspNetCore.Mvc.ApplicationModels.IApplicationModelConvention to register model binders

TypeModuleOutputFormatters

All registered IJsonOutputFormatter for types

Declaration
public IDictionary<Type, FormatterRegistration> TypeModuleOutputFormatters { get; }
Property Value
Type Description
System.Collections.Generic.IDictionary<System.Type, FormatterRegistration>
Remarks

The option will not register any model binders for request bodies. One option can be to register a custom Microsoft.AspNetCore.Mvc.ApplicationModels.IApplicationModelConvention to register model binders

Extension Methods