Package facebook4j.internal.org.json

Examples of facebook4j.internal.org.json.JSONArray


    /*package*/
    static PagableList<Question.Option> createOptionList(JSONObject json)
    throws FacebookException {
        try {
            JSONArray list = json.getJSONArray("data");
            final int size = list.length();
            PagableList<Question.Option> options = new PagableListImpl<Question.Option>(size, json);
            for (int i = 0; i < size; i++) {
                Question.Option option = new OptionJSONImpl(list.getJSONObject(i));
                options.add(option);
            }
            return options;
        } catch (JSONException jsone) {
            throw new FacebookException(jsone);
View Full Code Here


        try {
            if (conf.isJSONStoreEnabled()) {
                DataObjectFactoryUtil.clearThreadLocalMap();
            }
            JSONObject json = res.asJSONObject();
            JSONArray list = json.getJSONArray("data");
            final int size = list.length();
            ResponseList<Question.Option> options = new ResponseListImpl<Question.Option>(size, json);
            for (int i = 0; i < size; i++) {
                Question.Option option = new OptionJSONImpl(list.getJSONObject(i));
                options.add(option);
            }
            if (conf.isJSONStoreEnabled()) {
                DataObjectFactoryUtil.registerJSONObject(options, json);
            }
View Full Code Here

        try {
            if (conf.isJSONStoreEnabled()) {
                DataObjectFactoryUtil.clearThreadLocalMap();
            }
            JSONObject json = res.asJSONObject();
            JSONArray list = json.getJSONArray("data");
            final int size = list.length();
            ResponseList<Tag> tags = new ResponseListImpl<Tag>(size, json);
            for (int i = 0; i < size; i++) {
                JSONObject tagJSONObject = list.getJSONObject(i);
                Tag tag = new TagJSONImpl(tagJSONObject);
                if (conf.isJSONStoreEnabled()) {
                    DataObjectFactoryUtil.registerJSONObject(tag, tagJSONObject);
                }
                tags.add(tag);
View Full Code Here

        try {
            if (conf.isJSONStoreEnabled()) {
                DataObjectFactoryUtil.clearThreadLocalMap();
            }
            JSONObject json = res.asJSONObject();
            JSONArray list = json.getJSONArray("data");
            final int size = list.length();
            ResponseList<Subscriber> subscribers = new ResponseListImpl<Subscriber>(size, json);
            for (int i = 0; i < size; i++) {
                JSONObject subscriberJSONObject = list.getJSONObject(i);
                Subscriber subscriber = new SubscriberJSONImpl(subscriberJSONObject);
                if (conf.isJSONStoreEnabled()) {
                    DataObjectFactoryUtil.registerJSONObject(subscriber, subscriberJSONObject);
                }
                subscribers.add(subscriber);
View Full Code Here

        try {
            if (conf.isJSONStoreEnabled()) {
                DataObjectFactoryUtil.clearThreadLocalMap();
            }
            JSONObject json = res.asJSONObject();
            JSONArray list = json.getJSONArray("data");
            final int size = list.length();
            ResponseList<Music> musics = new ResponseListImpl<Music>(size, json);
            for (int i = 0; i < size; i++) {
                JSONObject musicJSONObject = list.getJSONObject(i);
                Music music = new MusicJSONImpl(musicJSONObject);
                if (conf.isJSONStoreEnabled()) {
                    DataObjectFactoryUtil.registerJSONObject(music, musicJSONObject);
                }
                musics.add(music);
View Full Code Here

        try {
            if (conf.isJSONStoreEnabled()) {
                DataObjectFactoryUtil.clearThreadLocalMap();
            }
            JSONObject json = res.asJSONObject();
            JSONArray list = json.getJSONArray("data");
            final int size = list.length();
            ResponseList<GroupMember> members = new ResponseListImpl<GroupMember>(size, json);
            for (int i = 0; i < size; i++) {
                JSONObject groupMemberJSONObject = list.getJSONObject(i);
                GroupMember member = new GroupMemberJSONImpl(groupMemberJSONObject);
                if (conf.isJSONStoreEnabled()) {
                    DataObjectFactoryUtil.registerJSONObject(member, groupMemberJSONObject);
                }
                members.add(member);
View Full Code Here

        try {
            if (conf.isJSONStoreEnabled()) {
                DataObjectFactoryUtil.clearThreadLocalMap();
            }
            JSONObject json = res.asJSONObject();
            JSONArray list = json.getJSONArray("data");
            final int size = list.length();
            ResponseList<Insight> insights = new ResponseListImpl<Insight>(size, json);
            for (int i = 0; i < size; i++) {
                JSONObject insightJSONObject = list.getJSONObject(i);
                Insight insight = new InsightJSONImpl(insightJSONObject);
                if (conf.isJSONStoreEnabled()) {
                    DataObjectFactoryUtil.registerJSONObject(insight, insightJSONObject);
                }
                insights.add(insight);
View Full Code Here

        }
    }

    private List<Insight.Value> createValueList(JSONObject json) throws FacebookException {
        try {
            JSONArray list = json.getJSONArray("values");
            final int size = list.length();
            List<Insight.Value> values = new ArrayList<Insight.Value>(size);
            for (int i = 0; i < size; i++) {
                Insight.Value value = new ValueJSONImpl(list.getJSONObject(i));
                values.add(value);
            }
            return values;
        } catch (JSONException jsone) {
            throw new FacebookException(jsone);
View Full Code Here

        try {
            if (conf.isJSONStoreEnabled()) {
                DataObjectFactoryUtil.clearThreadLocalMap();
            }
            JSONObject json = res.asJSONObject();
            JSONArray list = json.getJSONArray("data");
            final int size = list.length();
            ResponseList<Activity> activities = new ResponseListImpl<Activity>(size, json);
            for (int i = 0; i < size; i++) {
                JSONObject activityJSONObject = list.getJSONObject(i);
                Activity activity = new ActivityJSONImpl(activityJSONObject);
                if (conf.isJSONStoreEnabled()) {
                    DataObjectFactoryUtil.registerJSONObject(activity, activityJSONObject);
                }
                activities.add(activity);
View Full Code Here

        try {
            if (conf.isJSONStoreEnabled()) {
                DataObjectFactoryUtil.clearThreadLocalMap();
            }
            JSONObject json = res.asJSONObject();
            JSONArray list = json.getJSONArray("data");
            final int size = list.length();
            ResponseList<Television> televisions = new ResponseListImpl<Television>(size, json);
            for (int i = 0; i < size; i++) {
                JSONObject televisionJSONObject = list.getJSONObject(i);
                Television television = new TelevisionJSONImpl(televisionJSONObject);
                if (conf.isJSONStoreEnabled()) {
                    DataObjectFactoryUtil.registerJSONObject(television, televisionJSONObject);
                }
                televisions.add(television);
View Full Code Here

TOP

Related Classes of facebook4j.internal.org.json.JSONArray

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.