Re: best way to convert JSONB object from result

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Tom Smith <tomsmith1989sk(at)gmail(dot)com>
Cc: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: best way to convert JSONB object from result
Date: 2015-08-20 02:13:42
Message-ID: CADK3HHLeZ30U3Af6v0E3+C+0U1+RU51cebvGcYS591Cs67m0vg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Use boon,jackson or some other json parser to parse it into an object.

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

On 19 August 2015 at 15:20, Tom Smith <tomsmith1989sk(at)gmail(dot)com> wrote:

> Hi:
>
> I am trying to convert to a Java or Map object
> from resultset with a jsonb column.
> Currently, I am using
>
> String jsonString = resultSet.getString("jsonb_column_name")
>
> then I convert from jsonString to a Map<String,Object> or a Java class
> object.
>
> This is obviously inefficient. What would be most efficient (not too
> complicated)
>
> Thanks in Advance
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Amit Kapila 2015-08-20 03:06:31 Re: Proposal: Implement failover on libpq connect level.
Previous Message dmp 2015-08-20 00:40:16 Re: sql type reported for enum