Search Results for

    Show / Hide Table of Contents

    Class NpgsqlJsonNetExtensions

    Extension allowing adding the Json.NET plugin to an Npgsql type mapper.

    Inheritance
    object
    NpgsqlJsonNetExtensions
    Namespace: Npgsql
    Assembly: Npgsql.Json.NET.dll
    Syntax
    public static class NpgsqlJsonNetExtensions

    Methods

    | Improve this Doc View Source

    UseJsonNet(INpgsqlTypeMapper, JsonSerializerSettings?, Type[]?, Type[]?)

    Sets up JSON.NET mappings for the PostgreSQL json and jsonb types.

    Declaration
    public static INpgsqlTypeMapper UseJsonNet(this INpgsqlTypeMapper mapper, JsonSerializerSettings? settings = null, Type[]? jsonbClrTypes = null, Type[]? jsonClrTypes = null)
    Parameters
    Type Name Description
    INpgsqlTypeMapper mapper

    The type mapper to set up.

    JsonSerializerSettings? settings

    Optional settings to customize JSON serialization.

    Type[] jsonbClrTypes

    A list of CLR types to map to PostgreSQL jsonb (no need to specify Jsonb).

    Type[] jsonClrTypes

    A list of CLR types to map to PostgreSQL json (no need to specify Json).

    Returns
    Type Description
    INpgsqlTypeMapper
    • Improve this Doc
    • View Source
    In This Article
    Back to top © Copyright 2023 The Npgsql Development Team