Search in sources :

Example 1 with Feed

use of com.androidquery.simplefeed.data.Feed in project simplefacebook by androidquery.

the class PTransformer method transform.

@Override
public <T> T transform(String url, Class<T> type, String encoding, byte[] data, AjaxStatus status) {
    if (type.equals(Feed.class)) {
        Feed result = null;
        try {
            String str = new String(data, encoding);
            JSONObject jo = (JSONObject) new JSONTokener(str).nextValue();
            result = new Feed(jo);
        } catch (Exception e) {
            AQUtility.debug(e);
        }
        return (T) result;
    }
    return null;
}
Also used : JSONTokener(org.json.JSONTokener) JSONObject(org.json.JSONObject) Feed(com.androidquery.simplefeed.data.Feed)

Aggregations

Feed (com.androidquery.simplefeed.data.Feed)1 JSONObject (org.json.JSONObject)1 JSONTokener (org.json.JSONTokener)1