Here is a possible modification to FqlResult, in the vein of FqlResultMapper:
If you need to map an array of primitives, like Integer, String, or Array, the existing FqlResultMapper will not suffice.
Class Cast Errors come out, since it tries to handle the data as a List of Map<String,Object>
Would a FqlValueMapper make sense?
Code:
public interface FqlValueMapper<T> {
T mapObject(Object objectValue);
}
with a function in FqlResult like
Code:
public <T> List<T> getList(String fieldName, FqlValueMapper<T> mapper) {
// get field as List<Object>, and iterate over each item, passing it to the FqlValueMaper
....
}
This would let us handle the stream table that has a list of ids in 'tagged_ids' or the 'message_tags' that is a List<List<tagObject>>
message_tags (class java.util.ArrayList): [[{id=100002886616615, name=Robert Blair, type=user, offset=0, length=12}]]
Should I make a bug, or make a pull request. (not the git expert yet, mind you.)