Closed GoogleCodeExporter closed 9 years ago
I'm not sure that Feed resp = response.parseAs(Feed.class) should be expected
to work because Feed would be an object, and the response is really an array of
objects. I wouldn't mind a syntax like:
List<Item> response = response.parseAs(Item.class);
We should be able to make that work, and would be the obvious thing if you had
used parseAs() before. OTOH, I'm not looking at the code right now. The use of
templating may require a different name, so the signature might be template
List<T> parseAsArray( class T);
Original comment by ai...@google.com
on 23 May 2011 at 1:34
An alternative is
List<Item> items = new ArrayList<Item>();
Status status = response.parseInto(items);
This eliminates the need for a template method, so it may result in less code
size.
Original comment by ai...@google.com
on 23 May 2011 at 3:32
Thanks for reporting the issue. Porting to the new google-http-java-client:
http://code.google.com/p/google-http-java-client/issues/detail?id=9
Original comment by yan...@google.com
on 23 May 2011 at 11:21
Original issue reported on code.google.com by
ddamo...@gmail.com
on 21 May 2011 at 5:35