亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? jsonobject.java

?? AJAX基礎(chǔ)編程--源代碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
    }    /**     * Get an optional value associated with a key.     * @exception NullPointerException  The key must not be null.     * @param key   A key string.     * @return      An object which is the value, or null if there is no value.     */    public Object opt(String key) throws NullPointerException {        if (key == null) {            throw new NullPointerException("Null key");        }        return myHashMap.get(key);    }    /**     * Get an optional boolean associated with a key.     * It returns false if there is no such key, or if the value is not     * Boolean.TRUE or the String "true".     *     * @param key   A key string.     * @return      The truth.     */    public boolean optBoolean(String key) {        return optBoolean(key, false);    }    /**     * Get an optional boolean associated with a key.     * It returns the defaultValue if there is no such key, or if it is not     * a Boolean or the String "true" or "false" (case insensitive).     *     * @param key              A key string.     * @param defaultValue     The default.     * @return      The truth.     */    public boolean optBoolean(String key, boolean defaultValue) {        Object o = opt(key);        if (o != null) {            if (o == Boolean.FALSE || 					(o instanceof String && 					((String)o).equalsIgnoreCase("false"))) {                return false;            } else if (o == Boolean.TRUE || 					(o instanceof String && 					((String)o).equalsIgnoreCase("true"))) {                return true;            }        }        return defaultValue;    }    /**     * Get an optional double associated with a key,     * or NaN if there is no such key or if its value is not a number.     * If the value is a string, an attempt will be made to evaluate it as     * a number.     *     * @param key   A string which is the key.     * @return      An object which is the value.     */    public double optDouble(String key)  {        return optDouble(key, Double.NaN);    }    /**     * Get an optional double associated with a key, or the     * defaultValue if there is no such key or if its value is not a number.     * If the value is a string, an attempt will be made to evaluate it as     * a number.     *     * @param key   A key string.     * @param defaultValue     The default.     * @return      An object which is the value.     */    public double optDouble(String key, double defaultValue)  {        Object o = opt(key);        if (o != null) {            if (o instanceof Number) {                return ((Number)o).doubleValue();            }            try {                return new Double((String)o).doubleValue();            }            catch (Exception e) {            }        }        return defaultValue;    }    /**     * Get an optional int value associated with a key,     * or zero if there is no such key or if the value is not a number.     * If the value is a string, an attempt will be made to evaluate it as     * a number.     *     * @param key   A key string.     * @return      An object which is the value.     */    public int optInt(String key) {        return optInt(key, 0);    }    /**     * Get an optional int value associated with a key,     * or the default if there is no such key or if the value is not a number.     * If the value is a string, an attempt will be made to evaluate it as     * a number.     *     * @param key   A key string.     * @param defaultValue     The default.     * @return      An object which is the value.     */    public int optInt(String key, int defaultValue) {        Object o = opt(key);        if (o != null) {            if (o instanceof Number) {                return ((Number)o).intValue();            }            try {                return Integer.parseInt((String)o);            } catch (Exception e) {            }        }        return defaultValue;    }    /**     * Get an optional JSONArray associated with a key.     * It returns null if there is no such key, or if its value is not a     * JSONArray.     *     * @param key   A key string.     * @return      A JSONArray which is the value.     */    public JSONArray optJSONArray(String key) {        Object o = opt(key);        if (o instanceof JSONArray) {            return (JSONArray) o;        }        return null;    }    /**     * Get an optional JSONObject associated with a key.     * It returns null if there is no such key, or if its value is not a     * JSONObject.     *     * @param key   A key string.     * @return      A JSONObject which is the value.     */    public JSONObject optJSONObject(String key) {        Object o = opt(key);        if (o instanceof JSONObject) {            return (JSONObject)o;        }        return null;    }    /**     * Get an optional string associated with a key.     * It returns an empty string if there is no such key. If the value is not     * a string and is not null, then it is coverted to a string.     *     * @param key   A key string.     * @return      A string which is the value.     */    public String optString(String key) {        return optString(key, "");    }    /**     * Get an optional string associated with a key.     * It returns the defaultValue if there is no such key.     *     * @param key   A key string.     * @param defaultValue     The default.     * @return      A string which is the value.     */    public String optString(String key, String defaultValue) {        Object o = opt(key);        if (o != null) {            return o.toString();        }        return defaultValue;    }    /**     * Put a key/boolean pair in the JSONObject.     *     * @param key   A key string.     * @param value A boolean which is the value.     * @return this.     */    public JSONObject put(String key, boolean value) {        put(key, new Boolean(value));        return this;    }    /**     * Put a key/double pair in the JSONObject.     *     * @param key   A key string.     * @param value A double which is the value.     * @return this.     */    public JSONObject put(String key, double value) {        put(key, new Double(value));        return this;    }    /**     * Put a key/int pair in the JSONObject.     *     * @param key   A key string.     * @param value An int which is the value.     * @return this.     */    public JSONObject put(String key, int value) {        put(key, new Integer(value));        return this;    }    /**     * Put a key/value pair in the JSONObject. If the value is null,     * then the key will be removed from the JSONObject if it is present.     * @exception NullPointerException The key must be non-null.     * @param key   A key string.     * @param value An object which is the value. It should be of one of these     *  types: Boolean, Double, Integer, JSONArray, JSONObject, String, or the     *  JSONObject.NULL object.     * @return this.     */    public JSONObject put(String key, Object value) throws NullPointerException {        if (key == null) {            throw new NullPointerException("Null key.");        }        if (value != null) {            myHashMap.put(key, value);        } else {            remove(key);        }        return this;    }    /**     * Put a key/value pair in the JSONObject, but only if the     * value is non-null.     * @exception NullPointerException The key must be non-null.     * @param key   A key string.     * @param value An object which is the value. It should be of one of these     *  types: Boolean, Double, Integer, JSONArray, JSONObject, String, or the     *  JSONObject.NULL object.     * @return this.     */    public JSONObject putOpt(String key, Object value) throws NullPointerException {        if (value != null) {            put(key, value);        }        return this;    }    /**     * Produce a string in double quotes with backslash sequences in all the     * right places.     * @param string A String     * @return  A String correctly formatted for insertion in a JSON message.     */    public static String quote(String string) {        if (string == null || string.length() == 0) {            return "\"\"";        }        char         c;        int          i;        int          len = string.length();        StringBuffer sb = new StringBuffer(len + 4);        String       t;        sb.append('"');        for (i = 0; i < len; i += 1) {            c = string.charAt(i);            switch (c) {            case '\\':            case '"':            case '/':                sb.append('\\');                sb.append(c);                break;            case '\b':                sb.append("\\b");                break;            case '\t':                sb.append("\\t");                break;            case '\n':                sb.append("\\n");                break;            case '\f':                sb.append("\\f");                break;            case '\r':                sb.append("\\r");                break;            default:                if (c < ' ') {                    t = "000" + Integer.toHexString(c);                    sb.append("\\u" + t.substring(t.length() - 4));                } else {                    sb.append(c);                }            }        }        sb.append('"');        return sb.toString();    }    /**     * Remove a name and its value, if present.     * @param key The name to be removed.     * @return The value that was associated with the name,     * or null if there was no value.     */    public Object remove(String key) {        return myHashMap.remove(key);    }    /**     * Produce a JSONArray containing the values of the members of this     * JSONObject.     * @param names A JSONArray containing a list of key strings. This     * determines the sequence of the values in the result.     * @return A JSONArray of values.     */    public JSONArray toJSONArray(JSONArray names) {        if (names == null || names.length() == 0) {            return null;        }        JSONArray ja = new JSONArray();        for (int i = 0; i < names.length(); i += 1) {            ja.put(this.opt(names.getString(i)));        }        return ja;    }    /**     * Make an JSON external form string of this JSONObject. For compactness, no     * unnecessary whitespace is added.     * <p>     * Warning: This method assumes that the data structure is acyclical.     *     * @return a printable, displayable, portable, transmittable     *  representation of the object, beginning      *  with <code>{</code>&nbsp;<small>(left brace)</small> and ending      *  with <code>}</code>&nbsp;<small>(right brace)</small>.     */    public String toString() {        Iterator     keys = keys();        Object       o = null;        String       s;        StringBuffer sb = new StringBuffer();        sb.append('{');        while (keys.hasNext()) {            if (o != null) {                sb.append(',');            }            s = keys.next().toString();            o = myHashMap.get(s);            if (o != null) {                sb.append(quote(s));                sb.append(':');                if (o instanceof String) {                    sb.append(quote((String)o));                } else if (o instanceof Number) {                    sb.append(numberToString((Number)o));                } else {                    sb.append(o.toString());                }            }        }        sb.append('}');        return sb.toString();    }    /**     * Make a prettyprinted JSON external form string of this JSONObject.     * <p>     * Warning: This method assumes that the data structure is acyclical.     * @param indentFactor The number of spaces to add to each level of     *  indentation.     * @return a printable, displayable, portable, transmittable     *  representation of the object, beginning     *  with <code>{</code>&nbsp;<small>(left brace)</small> and ending      *  with <code>}</code>&nbsp;<small>(right brace)</small>.     */    public String toString(int indentFactor) {        return toString(indentFactor, 0);    }    /**     * Make a prettyprinted JSON string of this JSONObject.     * <p>     * Warning: This method assumes that the data structure is acyclical.     * @param indentFactor The number of spaces to add to each level of     *  indentation.     * @param indent The indentation of the top level.     * @return a printable, displayable, transmittable     *  representation of the object, beginning      *  with <code>{</code>&nbsp;<small>(left brace)</small> and ending      *  with <code>}</code>&nbsp;<small>(right brace)</small>.     */    String toString(int indentFactor, int indent) {        int          i;        Iterator     keys = keys();        String       pad = "";        StringBuffer sb = new StringBuffer();        int newindent = indent + indentFactor;        for (i = 0; i < newindent; i += 1) {            pad += ' ';        }        sb.append('{');        while (keys.hasNext()) {            String s = keys.next().toString();            Object o = myHashMap.get(s);            if (o != null) {                if (sb.length() > 1) {                    sb.append(",\n");                } else {					sb.append('\n');                }                sb.append(pad);                sb.append(quote(s));                sb.append(": ");                if (o instanceof String) {                    sb.append(quote((String)o));                } else if (o instanceof Number) {                    sb.append(numberToString((Number) o));                } else if (o instanceof JSONObject) {                    sb.append(((JSONObject)o).toString(indentFactor, newindent));                } else if (o instanceof JSONArray) {                    sb.append(((JSONArray)o).toString(indentFactor, newindent));                } else {                    sb.append(o.toString());                }            }        }		if (sb.length() > 1) {			sb.append('\n');	        for (i = 0; i < indent; i += 1) {				sb.append(' ');	        }		}        sb.append('}');        return sb.toString();    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一二三四久久| 国产高清视频一区| 色婷婷综合久色| 亚洲国产精华液网站w| 九九九久久久精品| 6080yy午夜一二三区久久| 亚洲女子a中天字幕| 国产91对白在线观看九色| 欧美视频一区二区在线观看| 一区二区在线免费| 色综合久久天天| 亚洲老妇xxxxxx| 欧美午夜精品久久久| 香蕉久久一区二区不卡无毒影院| 欧洲国内综合视频| 丝袜亚洲精品中文字幕一区| 欧美一区二区视频免费观看| 久久99精品久久只有精品| 国产亚洲欧美色| 国产精品一区二区x88av| 91香蕉国产在线观看软件| 亚洲女子a中天字幕| 3atv一区二区三区| 国产成人免费视频网站高清观看视频| 国产亚洲美州欧州综合国| 97国产一区二区| 亚洲成av人片一区二区梦乃| 欧美成人一区二区| 色综合久久88色综合天天免费| 亚洲 欧美综合在线网络| 波多野洁衣一区| 7777精品伊人久久久大香线蕉的 | 91免费看`日韩一区二区| 日韩国产精品大片| 中文字幕一区二区三| 欧美精品一区二区高清在线观看| 99精品国产91久久久久久| 国产精品一区二区x88av| 亚洲一区二区三区四区五区黄| 欧美激情一区三区| www亚洲一区| xfplay精品久久| 精品电影一区二区| 日韩小视频在线观看专区| 欧美日产在线观看| 欧美性猛交xxxxxx富婆| 欧美日韩成人在线一区| 免费人成在线不卡| 久久精品亚洲精品国产欧美| 国产伦精品一区二区三区免费迷 | 久久精品夜色噜噜亚洲a∨| 99视频精品在线| 粉嫩嫩av羞羞动漫久久久| 天天色 色综合| 亚洲gay无套男同| 亚洲女同ⅹxx女同tv| 欧美激情在线看| 久久精品在线观看| www激情久久| 久久蜜桃av一区精品变态类天堂 | 亚洲一区影音先锋| 亚洲人成精品久久久久| 国产精品日日摸夜夜摸av| 国产网站一区二区| 国产午夜精品久久久久久久| 国产三级三级三级精品8ⅰ区| 2020国产精品久久精品美国| 精品国产乱码久久久久久老虎| 久久夜色精品一区| 国产三级欧美三级日产三级99| 欧美激情综合五月色丁香| 国产精品污www在线观看| 国产精品美女久久久久久| 亚洲视频精选在线| 一区二区三区高清在线| 免费高清视频精品| 国产精品18久久久久久久久久久久 | 国产一区二区不卡在线| 欧美影院一区二区| 久久久国产精品麻豆| 亚洲视频免费在线观看| 久久狠狠亚洲综合| 日本高清视频一区二区| 7777精品伊人久久久大香线蕉的| 欧美一区二区免费视频| 国产午夜精品理论片a级大结局| 日韩毛片视频在线看| 免费一区二区视频| 色94色欧美sute亚洲线路一久 | 欧美午夜影院一区| 亚洲桃色在线一区| 国产大陆亚洲精品国产| 69久久夜色精品国产69蝌蚪网| 亚洲二区在线观看| 不卡av在线网| 国产日本欧洲亚洲| 老司机午夜精品| 欧美精品久久久久久久多人混战 | 欧美亚一区二区| 中文字幕一区不卡| 国产乱码一区二区三区| 欧美精品日日鲁夜夜添| 亚洲最新视频在线观看| 成人爱爱电影网址| 国产亚洲精品久| 成人h版在线观看| 国产精品午夜免费| 99re6这里只有精品视频在线观看| 亚洲国产成人一区二区三区| 国产一区二区三区在线观看精品 | 色偷偷88欧美精品久久久| 中文字幕日韩精品一区| 99re热视频精品| 天天av天天翘天天综合网色鬼国产| 欧美在线观看视频一区二区三区| 亚洲蜜臀av乱码久久精品蜜桃| 91小视频在线免费看| 亚洲成a人片在线不卡一二三区 | 国产激情一区二区三区四区| 久久你懂得1024| 日本乱人伦一区| 国产乱人伦偷精品视频免下载| 国产亚洲精品aa| 欧美日韩精品欧美日韩精品一 | 国产精品久久久久久久久动漫 | 国产高清一区日本| 亚洲图片自拍偷拍| 久久久久久99精品| 在线一区二区视频| 久久99在线观看| 亚洲午夜免费福利视频| 精品美女在线播放| 色偷偷久久一区二区三区| 国产成人鲁色资源国产91色综| 国产精品久久久久精k8| 欧美肥胖老妇做爰| 成人一区二区三区在线观看| 亚洲精品国产第一综合99久久| 欧美午夜精品一区二区蜜桃| 免费不卡在线观看| 亚洲最色的网站| 久久久久久久久一| 欧美日韩午夜在线视频| 成人免费观看男女羞羞视频| 亚洲国产日韩av| 国产精品久久久久久久久免费桃花| 欧美色国产精品| 色网综合在线观看| av一二三不卡影片| 激情图区综合网| 蜜臀va亚洲va欧美va天堂 | 色婷婷综合视频在线观看| 成人综合激情网| 国产麻豆日韩欧美久久| 日本中文字幕一区二区视频| 亚洲男人都懂的| 亚洲chinese男男1069| 亚洲一区精品在线| 午夜av一区二区| 免费观看30秒视频久久| 五月天国产精品| 国产麻豆精品视频| 99精品久久只有精品| 在线视频国产一区| 精品国产髙清在线看国产毛片 | 一本在线高清不卡dvd| 在线观看中文字幕不卡| 日韩一区二区三区视频在线| 欧美成人video| 亚洲天堂久久久久久久| 午夜精品成人在线视频| 韩国精品一区二区| 97国产精品videossex| 欧美一区二区三区视频在线| 欧美极品aⅴ影院| 一区二区三区四区蜜桃| 精品在线播放免费| 色妞www精品视频| 久久久噜噜噜久久人人看| 亚洲啪啪综合av一区二区三区| 亚洲一区二区三区不卡国产欧美| 日韩av成人高清| 99久久伊人精品| 久久久久高清精品| 亚洲国产一区二区在线播放| 久久er精品视频| 欧美一区国产二区| 国产精品不卡视频| 国产在线视频一区二区三区| 欧美日韩亚洲高清一区二区| 亚洲天堂2014| caoporen国产精品视频| 精品国精品国产尤物美女| 亚洲香肠在线观看| 色综合久久天天| 国产精品国产三级国产有无不卡 | 亚洲午夜一区二区三区| 99久久精品国产观看| 中文字幕不卡的av| 国产福利一区二区三区视频|