resultConverter

fun resultConverter(json: Json): ResultConverter<*, *>

A read converter for the database's registrations that decodes payloads with json rather than with the one each class was registered with.

For the query whose payloads are shaped differently from the rest - built in SQL with jsonb_build_object and therefore named the way SQL names things, or written by a service that is not this one. Register it on a single query with registerResultConverter: query registries sit ahead of the session's and are discarded with the query, so nothing else on the connection reads that way.

db.select("benefit").from("veterans")
.registerResultConverter(db.dynamicTypes.resultConverter(snakeCaseJson))
.fetchFields<Benefit>()

Return

The converter, registered nowhere until you register it.

Parameters

json

How to read the payloads.