Closed GoogleCodeExporter closed 8 years ago
Are these users or pages? Try mapping to the Page type and see if that works
for you.
Original comment by m...@xmog.com
on 12 Jun 2012 at 1:31
Good point. Now I can see that from the library perspective these are Pages
indeed, however when retrieving Posts (from any wall feed or search) these
objects may be their authors. Their IDs passed in "from" field are
undistinguishable from User IDs, so one never knows which object type to apply
when fetching the "author" of a post.
Thus effectively it is not a bug, but the question remains if there is any
(automatic) way of fetching the author's data only once, determine its type and
fill the appropriate object on the fly. I guess all one can do is to perform
manual JSON object parsing.
Original comment by jdanilew...@trendit.es
on 12 Jun 2012 at 2:06
Sorry for the slow response. Yes, unfortunately if there's a mixed bag of
elements returned, you're probably best off mapping to a List of JsonObject and
examining each one and manually mapping to User or Page as appropriate using
JsonMapper :(
I don't think there's a better way around this, but if you can think of one,
please let me know! Thanks.
Original comment by m...@xmog.com
on 12 Jul 2012 at 2:20
Original issue reported on code.google.com by
jdanilew...@trendit.es
on 12 Jun 2012 at 12:02