pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: How to debug JSONSerializer errors?
Date Tue, 23 Nov 2010 00:36:54 GMT
Ah, OK. You can use the org.apache.pivot.util.TypeLiteral class for this. This class was actually
ported from Google Guice.

On Nov 22, 2010, at 7:20 PM, Bill van Melle wrote:

> Not sure exactly what you are trying to do. 
> 
> I'm trying to fill in the blank in
> 
>   query.setSerializer(???);
> 
> for the case where my web call returns an array of a type that I have declared, i.e.,
it sends back something of the form
> 
>   [{...instance1...}, {...instance2...}, ...]
> 
> Java doesn't let me say
> 
>   query.setSerializer(new JSONSerializer(ArrayList<Foo>.class));
> 


Mime
View raw message