package com.letv.mobile.letvhttplib.parser;

import android.text.TextUtils;
import com.alibaba.fastjson.JSON;
import com.letv.mobile.letvhttplib.utils.BaseTypeUtils;
import com.letv.mobile.letvhttplib.utils.Logger;
import org.json.JSONArray;
import org.json.JSONObject;

public class CommonParser {
    protected boolean isNull(JSONArray array) {
        return array == null || array.length() == 0;
    }

    protected boolean isNull(JSONObject object) {
        return object == null || JSONObject.NULL.equals(object);
    }

    public boolean has(JSONObject jsonObject, String name) {
        return jsonObject.has(name);
    }

    protected int getInt(JSONObject object, String name) {