mplement the JSONWriter protocol for the
>>>>>>> Jdbc4Array class, and possibly for the datatypes that are in the
>>>>>>> array. This for example makes the json library aware of
>>>>>>> java.util.Date classes.
>>>>>&g
>>>>>
>>>>>> (extend-type java.util.Date
>>>>>> JSONWriter
>>>>>> (-write [date out]
>>>>>> (-write (str date) out)))
>>>>>>
>>>>>> Something like this (not tested):
&
t;>> (-write [date out]
>>>>> (-write (str date) out)))
>>>>>
>>>>> Something like this (not tested):
>>>>>
>>>>> (extend-type org.postgresql.jdbc4.**Jdbc4Arra**y
>>>>> JSONWriter
>>>
y)) out)))
>>>>
>>>> Roman
>>>>
>>>>
>>>> On Tuesday, October 1, 2013 3:57:02 PM UTC+2, Christian Jauvin wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I asked this question on Stack Overflow
I want to jsonify the results of a query performed against a Postgres
>>>> table containing a column of type text[], but the problem is that
>>>> clojure.data.json.write-str doesn't seem to know how to handle PG
>>>> arrays:
>>>>
>>>> *E
a Postgres
>>> table containing a column of type text[], but the problem is that
>>> clojure.data.json.write-str doesn't seem to know how to handle PG
>>> arrays:
>>>
>>> *Exception Don't know how to write JSON of class
>>> org.postg
of class
>> org.postgresql.jdbc4.Jdbc4Array clojure.data.json/write-generic*
>>
>> Do I have to supply a custom handler, or is there a simpler way?
>>
>>
>>
>> http://stackoverflow.com/questions/19103870/jsonify-a-jdbc4array-in-clojure
>>
>> I'm
te JSON of class
> org.postgresql.jdbc4.Jdbc4Array clojure.data.json/write-generic*
>
> Do I have to supply a custom handler, or is there a simpler way?
>
>
> http://stackoverflow.com/questions/19103870/jsonify-a-jdbc4array-in-clojure
>
> I'm asking it here in the
now how to write JSON of class
org.postgresql.jdbc4.Jdbc4Array clojure.data.json/write-generic*
Do I have to supply a custom handler, or is there a simpler way?
http://stackoverflow.com/questions/19103870/jsonify-a-jdbc4array-in-clojure
I'm asking it here in the hope of getting (m