Dela via


MvcNewtonsoftJsonOptions Class

Definition

Provides programmatic configuration for JSON formatters using Newtonsoft.JSON.

public ref class MvcNewtonsoftJsonOptions : System::Collections::Generic::IEnumerable<Microsoft::AspNetCore::Mvc::Infrastructure::ICompatibilitySwitch ^>
public class MvcNewtonsoftJsonOptions : System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.Infrastructure.ICompatibilitySwitch>
type MvcNewtonsoftJsonOptions = class
    interface seq<ICompatibilitySwitch>
    interface IEnumerable
Public Class MvcNewtonsoftJsonOptions
Implements IEnumerable(Of ICompatibilitySwitch)
Inheritance
MvcNewtonsoftJsonOptions
Implements

Constructors

MvcNewtonsoftJsonOptions()

Properties

AllowInputFormatterExceptionMessages

Gets or sets a flag to determine whether error messages from JSON deserialization by the NewtonsoftJsonInputFormatter will be added to the ModelStateDictionary. If false, a generic error message will be used instead.

InputFormatterMemoryBufferThreshold

Gets the maximum size to buffer in memory when SuppressInputFormatterBuffering is not set.

NewtonsoftJsonInputFormatter buffers the input stream by default, buffering up to a certain amount in memory, before buffering to disk. This option configures the size in bytes that MVC will buffer in memory, before switching to disk.

OutputFormatterMemoryBufferThreshold

Gets the maximum size to buffer in memory when SuppressOutputFormatterBuffering is not set.

NewtonsoftJsonOutputFormatter buffers the output stream by default, buffering up to a certain amount in memory, before buffering to disk. This option configures the size in bytes that MVC will buffer in memory, before switching to disk.

ReadJsonWithRequestCulture

Gets or sets a flag to determine whether the value of CurrentCulture for the current HTTP request is used for JSON deserialization by NewtonsoftJsonInputFormatter.

SerializerSettings

Gets the Newtonsoft.Json.JsonSerializerSettings that are used by this application.

Explicit Interface Implementations

IEnumerable.GetEnumerator()
IEnumerable<ICompatibilitySwitch>.GetEnumerator()

Extension Methods

UseCamelCasing(MvcNewtonsoftJsonOptions, Boolean)

Configures the casing behavior of JSON serialization to use camel case for property names, and optionally for dynamic types and dictionary keys.

UseMemberCasing(MvcNewtonsoftJsonOptions)

Configures the casing behavior of JSON serialization to use the member's casing for property names, properties of dynamic types, and dictionary keys.

Applies to