Table of Contents

Class JsonSerializerOptions

Namespace
nanoFramework.Json
Assembly
nanoFramework.Json.dll

Provides options to be used with JsonSerializer.

public sealed class JsonSerializerOptions
Inheritance
JsonSerializerOptions
Inherited Members
Extension Methods

Constructors

JsonSerializerOptions()

Constructs a new JsonSerializerOptions instance.

public JsonSerializerOptions()

JsonSerializerOptions(JsonSerializerDefaults)

Constructs a new JsonSerializerOptions instance with a predefined set of options determined by the specified JsonSerializerDefaults.

public JsonSerializerOptions(JsonSerializerDefaults defaults)

Parameters

defaults JsonSerializerDefaults

The JsonSerializerDefaults to reason about.

Properties

Default

Gets a singleton instance of JsonSerializerOptions that uses the default configuration.

public static JsonSerializerOptions Default { get; }

Property Value

JsonSerializerOptions

PropertyNameCaseInsensitive

Determines whether a property's name uses a case-insensitive comparison during deserialization. The default value is false.

public bool PropertyNameCaseInsensitive { get; set; }

Property Value

bool

Remarks

There is a performance cost associated when the value is true.

Resolver

Gets or sets resolver which is used to find properties in target object when deserializing JSON.

public IMemberResolver Resolver { get; set; }

Property Value

IMemberResolver

ThrowExceptionWhenPropertyNotFound

Gets or sets a value indicating whether deserialization should throw exception when no property found. The default value is false.

public bool ThrowExceptionWhenPropertyNotFound { get; set; }

Property Value

bool