Allow set/get json column as Buffer (utf-8 encoded string)
Sometime I want to map Json column <-> POJO object. So it's great if I can set json column as Buffer (utf-8 string bytes), and get json column as Buffer when retrieve. This allow me use dsl-json (https://github.com/ngs-doo/dsl-json A high performance json mapping) to convert Pojo object <-> json bytes.
I know we can use JsonObject.map() but it's slow due jackson is pretty slow and we need created temporary json object.
I think directly mapping from bytes to pojo is more performance
I'm not sure this is possible but we will see what we can do
It would be good if we make the data type codec registrable so that we can not only provide APIs for custom codecs but also make it possible to dynamically plug in a codec for Postgres custom data type(see https://github.com/eclipse-vertx/vertx-sql-client/issues/343).
There is also a similar request in https://github.com/eclipse-vertx/vertx-sql-client/issues/476.
@longdt can you cast in the Postgres query the JSON to a String or Buffer and then get the encoded JSON from here ?