FYI, another thing you can do is create a class that extends ArrayList<Foo> and 
pass that as the type argument. I'll admit that both approaches are kind of 
clumsy, but either one should work.
G

On Nov 22, 2010, at 7:36 PM, Greg Brown wrote:

> 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));
>> 
> 

Reply via email to