Class NpgsqlJsonNetExtensions
Extension allowing adding the Json.NET plugin to an Npgsql type mapper.
Inherited Members
Namespace: Npgsql
Assembly: Npgsql.Json.NET.dll
Syntax
public static class NpgsqlJsonNetExtensions
Methods
UseJsonNet(INpgsqlTypeMapper, Type[], Type[], Nullable<JsonSerializerSettings>)
Sets up JSON.NET mappings for the PostgreSQL json and jsonb types.
Declaration
public static INpgsqlTypeMapper UseJsonNet(this INpgsqlTypeMapper mapper, Type[] jsonbClrTypes = null, Type[] jsonClrTypes = null, JsonSerializerSettings? settings = null)
Parameters
Type | Name | Description |
---|---|---|
INpgsqlTypeMapper | mapper | The type mapper to set up (global or connection-specific) |
Type[] | jsonbClrTypes | A list of CLR types to map to PostgreSQL jsonb (no need to specify NpgsqlDbType.Jsonb) |
Type[] | jsonClrTypes | A list of CLR types to map to PostgreSQL json (no need to specify NpgsqlDbType.Json) |
Nullable<JsonSerializerSettings> | settings | Optional settings to customize JSON serialization |
Returns
Type | Description |
---|---|
INpgsqlTypeMapper |