Table of Contents

Struct JsonSerializer.DeserializePathOptions<TRoot, TElement>

Namespace
Nerdbank.Json
Assembly
Nerdbank.Json.dll

Options for selecting a value within a JSON document.

public record struct JsonSerializer.DeserializePathOptions<TRoot, TElement> : IEquatable<JsonSerializer.DeserializePathOptions<TRoot, TElement>>

Type Parameters

TRoot

The root document type.

TElement

The selected value type.

Implements
Inherited Members

Remarks

The expression is parsed without compilation. Member names honor the naming policy; indices must be constants. Use JsonPath for dynamic indices.

Constructors

DeserializePathOptions(Expression<Func<TRoot, TElement>>)

Options for selecting a value within a JSON document.

public DeserializePathOptions(Expression<Func<TRoot, TElement>> Path)

Parameters

Path Expression<Func<TRoot, TElement>>

The expression selecting the value.

Remarks

The expression is parsed without compilation. Member names honor the naming policy; indices must be constants. Use JsonPath for dynamic indices.

Properties

DefaultForUndiscoverablePath

Gets a value indicating whether a missing path produces the default value instead of an exception.

public bool DefaultForUndiscoverablePath { readonly get; init; }

Property Value

bool

Path

The expression selecting the value.

public Expression<Func<TRoot, TElement>> Path { readonly get; set; }

Property Value

Expression<Func<TRoot, TElement>>