Class JsonFormatterOptionsExtensions
Convenient methods to configure Json
Inheritance
Namespace: EPiServer.Formatters
Assembly: EPiServer.Cms.AspNetCore.dll
Version: 12.0.3Syntax
public static class JsonFormatterOptionsExtensions : Object
Methods
UseNewtonsoftJson(JsonFormatterOptions, Assembly, String)
Registers Newtonsoft based IJson
Declaration
public static JsonFormatterOptions UseNewtonsoftJson(this JsonFormatterOptions jsonFormatterOptions, Assembly assembly, string optionName = null)
Parameters
Type | Name | Description |
---|---|---|
Json |
jsonFormatterOptions | The options to configure |
System. |
assembly | The assembly to register formatter for |
System. |
optionName | An optional name for Newtonsoft |
Returns
Type | Description |
---|---|
Json |
Option for further configuration |
UseNewtonsoftJsonInputFormatter(JsonFormatterOptions, Assembly, String)
Registers Newtonsoft based IJson
Declaration
public static JsonFormatterOptions UseNewtonsoftJsonInputFormatter(this JsonFormatterOptions jsonFormatterOptions, Assembly assembly, string optionName = null)
Parameters
Type | Name | Description |
---|---|---|
Json |
jsonFormatterOptions | The options to configure |
System. |
assembly | The assembly to register formatter for |
System. |
optionName | An optional name for Newtonsoft |
Returns
Type | Description |
---|---|
Json |
Option for further configuration |
UseNewtonsoftJsonOutputFormatter(JsonFormatterOptions, Assembly, String)
Registers Newtonsoft based IJson
Declaration
public static JsonFormatterOptions UseNewtonsoftJsonOutputFormatter(this JsonFormatterOptions jsonFormatterOptions, Assembly assembly, string optionName = null)
Parameters
Type | Name | Description |
---|---|---|
Json |
jsonFormatterOptions | The options to configure |
System. |
assembly | The assembly to register formatter for |
System. |
optionName | An optional name for Newtonsoft |
Returns
Type | Description |
---|---|
Json |
Option for further configuration |
UseSystemTextJson(JsonFormatterOptions, Assembly, String)
Registers System.Text.Json based IJson
Declaration
public static JsonFormatterOptions UseSystemTextJson(this JsonFormatterOptions jsonFormatterOptions, Assembly assembly, string optionName = null)
Parameters
Type | Name | Description |
---|---|---|
Json |
jsonFormatterOptions | The options to configure |
System. |
assembly | The assembly to register formatter for |
System. |
optionName | An optional name for System |
Returns
Type | Description |
---|---|
Json |
Option for further configuration |
UseSystemTextJsonInputFormatter(JsonFormatterOptions, Assembly, String)
Registers System.Text.Json based IJson
Declaration
public static JsonFormatterOptions UseSystemTextJsonInputFormatter(this JsonFormatterOptions jsonFormatterOptions, Assembly assembly, string optionName = null)
Parameters
Type | Name | Description |
---|---|---|
Json |
jsonFormatterOptions | The options to configure |
System. |
assembly | The assembly to register formatter for |
System. |
optionName | An optional name for System |
Returns
Type | Description |
---|---|
Json |
Option for further configuration |
UseSystemTextJsonOutputFormatter(JsonFormatterOptions, Assembly, String)
Registers System.Text.Json based IJson
Declaration
public static JsonFormatterOptions UseSystemTextJsonOutputFormatter(this JsonFormatterOptions jsonFormatterOptions, Assembly assembly, string optionName = null)
Parameters
Type | Name | Description |
---|---|---|
Json |
jsonFormatterOptions | The options to configure |
System. |
assembly | The assembly to register formatter for |
System. |
optionName | An optional name for System |
Returns
Type | Description |
---|---|
Json |
Option for further configuration |