Table of Contents

Class JsonColumnConverter<TModel, TProvider>

Namespace
NextORM.Core
Assembly
nextorm.core.dll

Serializes a property of TModel to a JSON column. The TProvider must be string (a text column), JsonElement (a provider-native JSON column exposed as an element) or JsonObject (ClickHouse's native JSON object-root transport). Named to avoid the System.Text.Json.Serialization.JsonConverter<T> collision.

public sealed class JsonColumnConverter<TModel, TProvider> : ValueConverter<TModel, TProvider>, IPropertyValueConverter

Type Parameters

TModel

The CLR type stored in the column.

TProvider

The provider representation: string, JsonElement or JsonObject.

Inheritance
ValueConverter<TModel, TProvider>
JsonColumnConverter<TModel, TProvider>
Implements
Inherited Members
Extension Methods

Constructors

JsonColumnConverter()

Creates a converter using the default serializer options.

public JsonColumnConverter()

JsonColumnConverter(JsonColumnOptions?)

Creates a converter using the options carried by options.

public JsonColumnConverter(JsonColumnOptions? options)

Parameters

options JsonColumnOptions

The fluent JSON column options, or null for the defaults.

Methods

ConvertFromProvider(TProvider?)

Converts a provider value back to the model representation.

public override TModel? ConvertFromProvider(TProvider? provider)

Parameters

provider TProvider

The provider value, or null.

Returns

TModel

The model value.

ConvertToProvider(TModel?)

Converts a model value to the provider representation.

public override TProvider? ConvertToProvider(TModel? model)

Parameters

model TModel

The model value, or null.

Returns

TProvider

The provider value.