Package facebook4j.internal.org.json

Examples of facebook4j.internal.org.json.JSONObject$Null


    static ResponseList<Insight> createInsightList(HttpResponse res, Configuration conf) throws FacebookException {
        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 final URL url;
    private final Boolean isSilhouette;

    /*package*/PictureJSONImpl(JSONObject json) throws FacebookException {
        try {
            JSONObject pictureJSONObject = json.getJSONObject("data");
            url = z_F4JInternalParseUtil.getURL("url", pictureJSONObject);
            isSilhouette = z_F4JInternalParseUtil.getBoolean("is_silhouette", pictureJSONObject);
        } catch (JSONException jsone) {
            throw new FacebookException(jsone);
        }
View Full Code Here

    static ResponseList<Activity> createActivityList(HttpResponse res, Configuration conf) throws FacebookException {
        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

    static ResponseList<Television> createTelevisionList(HttpResponse res, Configuration conf) throws FacebookException {
        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

    private URL websiteUrl;

    private String canvasName;

    /*package*/ApplicationJSONImpl(HttpResponse res, Configuration conf) throws FacebookException {
        JSONObject json = res.asJSONObject();
        init(json);
        if (conf.isJSONStoreEnabled()) {
            DataObjectFactoryUtil.clearThreadLocalMap();
            DataObjectFactoryUtil.registerJSONObject(this, json);
        }
View Full Code Here

            }
            JSONArray jsonArray = json.getJSONArray("data");
            final int size = jsonArray.length();
            ResponseList<JSONObject> results = new ResponseListImpl<JSONObject>(size, json);
            for (int i = 0; i < size; i++) {
                JSONObject jsonObject = jsonArray.getJSONObject(i);
                if (null != conf && conf.isJSONStoreEnabled()) {
                    DataObjectFactoryUtil.registerJSONObject(jsonObject, jsonObject);
                }
                results.add(jsonObject);
            }
View Full Code Here

    static ResponseList<Like> createLikeList(HttpResponse res, Configuration conf) throws FacebookException {
        try {
            if (conf.isJSONStoreEnabled()) {
                DataObjectFactoryUtil.clearThreadLocalMap();
            }
            JSONObject json = res.asJSONObject();
            JSONArray list = json.getJSONArray("data");
            final int size = list.length();
            ResponseList<Like> likes = new ResponseListImpl<Like>(size, json);
            for (int i = 0; i < size; i++) {
                JSONObject likeJSONObject = list.getJSONObject(i);
                Like like = new LikeJSONImpl(likeJSONObject);
                if (conf.isJSONStoreEnabled()) {
                    DataObjectFactoryUtil.registerJSONObject(like, likeJSONObject);
                }
                likes.add(like);
View Full Code Here

    public FacebookResponseImpl() {}
   
    public FacebookResponseImpl(HttpResponse res) throws FacebookException {
        if (res == null) return;
        JSONObject json = res.asJSONObject();
        if (!json.isNull("metadata")) {
            try {
                metadata = new MetadataJSONImpl(json.getJSONObject("metadata"));
            } catch (JSONException jsone) {
                throw new FacebookException(jsone.getMessage(), jsone);
            }
        }
    }
View Full Code Here

    protected String category;
    protected Date createdTime;

    /*package*/CategoryJSONImpl(HttpResponse res, Configuration conf) throws FacebookException {
        super(res);
        JSONObject json = res.asJSONObject();
        init(json);
        if (conf.isJSONStoreEnabled()) {
            DataObjectFactoryUtil.clearThreadLocalMap();
            DataObjectFactoryUtil.registerJSONObject(this, json);
        }
View Full Code Here

    private String id;
    private List<String> perms;

    /*package*/AccountJSONImpl(HttpResponse res, Configuration conf) throws FacebookException {
        super(res);
        JSONObject json = res.asJSONObject();
        init(json);
        if (conf.isJSONStoreEnabled()) {
            DataObjectFactoryUtil.clearThreadLocalMap();
            DataObjectFactoryUtil.registerJSONObject(this, json);
        }
View Full Code Here

TOP

Related Classes of facebook4j.internal.org.json.JSONObject$Null

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.