Search Postgresql Archives

Re: How to retrieve jsonb column through JDBC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Mon, Aug 29, 2016 at 7:50 PM, Merlin Moncure <mmoncure@xxxxxxxxx> wrote:
On Sat, Aug 27, 2016 at 5:39 AM, Alexander Farber
<alexander.farber@xxxxxxxxx> wrote:
>
>          List last_tiles = (List) JSON.parse(rs.getString("last_tiles"));
>
> has not work for me even though the string is:
>
>  [{"col": 7, "row": 8, "value": 1, "letter": "A"}, {"col": 7, "row": 7,
> "value": 2, "letter": "B"}, {"col": 7, "row": 9, "value": 2, "letter": "C"}]
>
> but it is probably the problem of the Jetty class I am using and not of
> JDBC...

huh.  what exactly is failing? are you getting a parse exception?

http://download.eclipse.org/jetty/9.3.11.v20160721/apidocs/org/eclipse/jetty/util/ajax/JSON.html#parse-java.lang.String-

fails with:

java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to java.util.List

Regards
Alex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux