It's fairly common to have different document types in the same PG JSON column (after all, JSON is weakly-typed). Npgsql already allows giving a list of types which are mapped to jsonb, so that they can be written without specifying NpgsqlDbType.Jsonb. It seems useful to allow a similar thing for the read side: the user would configure the System.Text.Json plugin with a function which accepts a JsonDocument and returns a Type, and Npgsql would automatically execute that function and deserialize to that type. Typically a JSON property would act as the discriminator, but other schemes can be imagined as well.