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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? jsonwriter.java

?? 很好的json數據處理格式
?? JAVA
字號:
package org.json;import java.io.IOException;import java.io.Writer;/*Copyright (c) 2006 JSON.orgPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.The Software shall be used for Good, not Evil.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.*//** * JSONWriter provides a quick and convenient way of producing JSON text. * The texts produced strictly conform to JSON syntax rules. No whitespace is * added, so the results are ready for transmission or storage. Each instance of * JSONWriter can produce one JSON text. * <p> * A JSONWriter instance provides a <code>value</code> method for appending * values to the * text, and a <code>key</code> * method for adding keys before values in objects. There are <code>array</code> * and <code>endArray</code> methods that make and bound array values, and * <code>object</code> and <code>endObject</code> methods which make and bound * object values. All of these methods return the JSONWriter instance, * permitting a cascade style. For example, <pre> * new JSONWriter(myWriter) *     .object() *         .key("JSON") *         .value("Hello, World!") *     .endObject();</pre> which writes <pre> * {"JSON":"Hello, World!"}</pre> * <p> * The first method called must be <code>array</code> or <code>object</code>. * There are no methods for adding commas or colons. JSONWriter adds them for * you. Objects and arrays can be nested up to 20 levels deep. * <p> * This can sometimes be easier than using a JSONObject to build a string. * @author JSON.org * @version 2008-09-18 */public class JSONWriter {    private static final int maxdepth = 20;    /**     * The comma flag determines if a comma should be output before the next     * value.     */    private boolean comma;    /**     * The current mode. Values:     * 'a' (array),     * 'd' (done),     * 'i' (initial),     * 'k' (key),     * 'o' (object).     */    protected char mode;    /**     * The object/array stack.     */    private JSONObject stack[];    /**     * The stack top index. A value of 0 indicates that the stack is empty.     */    private int top;    /**     * The writer that will receive the output.     */    protected Writer writer;    /**     * Make a fresh JSONWriter. It can be used to build one JSON text.     */    public JSONWriter(Writer w) {        this.comma = false;        this.mode = 'i';        this.stack = new JSONObject[maxdepth];        this.top = 0;        this.writer = w;    }    /**     * Append a value.     * @param s A string value.     * @return this     * @throws JSONException If the value is out of sequence.     */    private JSONWriter append(String s) throws JSONException {        if (s == null) {            throw new JSONException("Null pointer");        }        if (this.mode == 'o' || this.mode == 'a') {            try {                if (this.comma && this.mode == 'a') {                    this.writer.write(',');                }                this.writer.write(s);            } catch (IOException e) {                throw new JSONException(e);            }            if (this.mode == 'o') {                this.mode = 'k';            }            this.comma = true;            return this;        }        throw new JSONException("Value out of sequence.");    }    /**     * Begin appending a new array. All values until the balancing     * <code>endArray</code> will be appended to this array. The     * <code>endArray</code> method must be called to mark the array's end.     * @return this     * @throws JSONException If the nesting is too deep, or if the object is     * started in the wrong place (for example as a key or after the end of the     * outermost array or object).     */    public JSONWriter array() throws JSONException {        if (this.mode == 'i' || this.mode == 'o' || this.mode == 'a') {            this.push(null);            this.append("[");            this.comma = false;            return this;        }        throw new JSONException("Misplaced array.");    }    /**     * End something.     * @param m Mode     * @param c Closing character     * @return this     * @throws JSONException If unbalanced.     */    private JSONWriter end(char m, char c) throws JSONException {        if (this.mode != m) {            throw new JSONException(m == 'o' ? "Misplaced endObject." :                "Misplaced endArray.");        }        this.pop(m);        try {            this.writer.write(c);        } catch (IOException e) {            throw new JSONException(e);        }        this.comma = true;        return this;    }    /**     * End an array. This method most be called to balance calls to     * <code>array</code>.     * @return this     * @throws JSONException If incorrectly nested.     */    public JSONWriter endArray() throws JSONException {        return this.end('a', ']');    }    /**     * End an object. This method most be called to balance calls to     * <code>object</code>.     * @return this     * @throws JSONException If incorrectly nested.     */    public JSONWriter endObject() throws JSONException {        return this.end('k', '}');    }    /**     * Append a key. The key will be associated with the next value. In an     * object, every value must be preceded by a key.     * @param s A key string.     * @return this     * @throws JSONException If the key is out of place. For example, keys     *  do not belong in arrays or if the key is null.     */    public JSONWriter key(String s) throws JSONException {        if (s == null) {            throw new JSONException("Null key.");        }        if (this.mode == 'k') {            try {                if (this.comma) {                    this.writer.write(',');                }                stack[top - 1].putOnce(s, Boolean.TRUE);                this.writer.write(JSONObject.quote(s));                this.writer.write(':');                this.comma = false;                this.mode = 'o';                return this;            } catch (IOException e) {                throw new JSONException(e);            }        }        throw new JSONException("Misplaced key.");    }    /**     * Begin appending a new object. All keys and values until the balancing     * <code>endObject</code> will be appended to this object. The     * <code>endObject</code> method must be called to mark the object's end.     * @return this     * @throws JSONException If the nesting is too deep, or if the object is     * started in the wrong place (for example as a key or after the end of the     * outermost array or object).     */    public JSONWriter object() throws JSONException {        if (this.mode == 'i') {            this.mode = 'o';        }        if (this.mode == 'o' || this.mode == 'a') {            this.append("{");            this.push(new JSONObject());            this.comma = false;            return this;        }        throw new JSONException("Misplaced object.");    }    /**     * Pop an array or object scope.     * @param c The scope to close.     * @throws JSONException If nesting is wrong.     */    private void pop(char c) throws JSONException {        if (this.top <= 0) {            throw new JSONException("Nesting error.");        }        char m = this.stack[this.top - 1] == null ? 'a' : 'k';        if (m != c) {            throw new JSONException("Nesting error.");        }        this.top -= 1;        this.mode = this.top == 0 ? 'd' : this.stack[this.top - 1] == null ? 'a' : 'k';    }    /**     * Push an array or object scope.     * @param c The scope to open.     * @throws JSONException If nesting is too deep.     */    private void push(JSONObject jo) throws JSONException {        if (this.top >= maxdepth) {            throw new JSONException("Nesting too deep.");        }        this.stack[this.top] = jo;        this.mode = jo == null ? 'a' : 'k';        this.top += 1;    }    /**     * Append either the value <code>true</code> or the value     * <code>false</code>.     * @param b A boolean.     * @return this     * @throws JSONException     */    public JSONWriter value(boolean b) throws JSONException {        return this.append(b ? "true" : "false");    }    /**     * Append a double value.     * @param d A double.     * @return this     * @throws JSONException If the number is not finite.     */    public JSONWriter value(double d) throws JSONException {        return this.value(new Double(d));    }    /**     * Append a long value.     * @param l A long.     * @return this     * @throws JSONException     */    public JSONWriter value(long l) throws JSONException {        return this.append(Long.toString(l));    }    /**     * Append an object value.     * @param o The object to append. It can be null, or a Boolean, Number,     *   String, JSONObject, or JSONArray, or an object with a toJSONString()     *   method.     * @return this     * @throws JSONException If the value is out of sequence.     */    public JSONWriter value(Object o) throws JSONException {        return this.append(JSONObject.valueToString(o));    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人欧美一区二区三区小说| 丰满放荡岳乱妇91ww| 国产一区二区三区在线观看精品| 不卡欧美aaaaa| 欧美大黄免费观看| 亚洲美女屁股眼交3| 精品一区二区三区视频| 欧美在线观看18| 国产精品美女久久福利网站| 狠狠色丁香婷综合久久| 欧美日韩国产首页| 亚洲色图欧洲色图| 床上的激情91.| wwwwww.欧美系列| 午夜精品久久久久| 91福利在线观看| 中文字幕不卡的av| 国产精品123| 欧美大肚乱孕交hd孕妇| 亚洲午夜日本在线观看| 91浏览器在线视频| 亚洲视频一区二区在线| 成人app下载| 国产片一区二区| 国产成人在线视频免费播放| 26uuu久久综合| 精品一区二区免费视频| 欧美zozo另类异族| 精品一区二区在线观看| 欧美tickle裸体挠脚心vk| 美女视频免费一区| 欧美成人精精品一区二区频| 青娱乐精品视频| 日韩欧美精品在线| 精品一区二区三区蜜桃| 精品播放一区二区| 国产精品中文字幕日韩精品| 久久久99久久精品欧美| 国产成人在线视频播放| 国产精品美女久久福利网站| www.在线成人| 亚洲欧美日韩综合aⅴ视频| 色婷婷综合久久| 午夜a成v人精品| 欧美一区永久视频免费观看| 久久66热re国产| 国产欧美va欧美不卡在线| 99免费精品视频| 亚洲曰韩产成在线| 欧美福利一区二区| 国产一区二区三区综合| 亚洲视频一区二区在线| 欧美日韩一级黄| 久久国产精品99精品国产| 国产日产欧美精品一区二区三区| 94-欧美-setu| 日韩激情av在线| 久久综合网色—综合色88| av资源网一区| 亚洲午夜精品在线| 精品1区2区在线观看| 99国产一区二区三精品乱码| 亚洲国产日韩精品| 国产香蕉久久精品综合网| 在线观看av不卡| 久久99久久精品| 亚洲色图另类专区| 欧美哺乳videos| 色综合久久中文字幕| 美女视频黄 久久| 中文字幕一区二区在线播放| 91精品久久久久久久99蜜桃| 北条麻妃国产九九精品视频| 日韩国产欧美在线观看| 国产精品久久久久永久免费观看| 欧美日韩一区二区在线观看| 国产成人免费在线| 日韩福利视频导航| 亚洲精品国产成人久久av盗摄| 精品少妇一区二区三区日产乱码| 99re成人在线| 国产在线精品一区二区三区不卡 | 一区二区三区视频在线看| 3751色影院一区二区三区| 成人伦理片在线| 老司机午夜精品| 亚洲一区二区四区蜜桃| 国产精品欧美经典| 欧美成人精品二区三区99精品| 色婷婷久久久综合中文字幕| 国产成a人亚洲精品| 麻豆精品一区二区| 婷婷中文字幕一区三区| 亚洲欧美日韩电影| 欧美激情在线一区二区三区| 日韩精品一区二区三区四区| 欧美色手机在线观看| 99这里只有久久精品视频| 国产麻豆精品在线观看| 久久狠狠亚洲综合| 免费高清在线一区| 日韩av在线播放中文字幕| 亚洲成在人线在线播放| 亚洲一区二区三区四区在线免费观看 | 亚洲女人的天堂| 国产精品视频在线看| 久久婷婷久久一区二区三区| 欧美一级二级在线观看| 欧美福利一区二区| 欧美精品自拍偷拍| 制服视频三区第一页精品| 欧美日韩在线一区二区| 欧美亚洲国产怡红院影院| 在线观看日韩电影| 欧美无乱码久久久免费午夜一区| 在线免费观看成人短视频| 色屁屁一区二区| 欧洲精品在线观看| 色综合天天狠狠| 欧美主播一区二区三区美女| 欧美在线一区二区三区| 91官网在线免费观看| 欧美色精品在线视频| 欧美军同video69gay| 欧美精品一级二级三级| 日韩一级黄色片| 精品国产污污免费网站入口 | 成人久久久精品乱码一区二区三区 | 亚洲精品大片www| 亚洲午夜在线视频| 人妖欧美一区二区| 国内成人免费视频| 成人av动漫网站| 欧美三片在线视频观看| 日韩亚洲欧美在线观看| 精品毛片乱码1区2区3区| 日本一区二区三区高清不卡| **性色生活片久久毛片| 午夜精品影院在线观看| 精品一区二区三区在线播放视频| 国产精品正在播放| 91豆麻精品91久久久久久| 91精品国产色综合久久| 久久久久国产一区二区三区四区| 国产精品蜜臀av| 五月天网站亚洲| 韩国精品在线观看| 色综合亚洲欧洲| 欧美一区二区三区视频| 中文字幕欧美三区| 午夜精品一区在线观看| 国产成人av电影免费在线观看| 91久久香蕉国产日韩欧美9色| 555www色欧美视频| 成人欧美一区二区三区视频网页| 日日夜夜免费精品| 国产mv日韩mv欧美| 91精品国产综合久久久蜜臀图片 | 国产成人a级片| 欧美性一二三区| 亚洲国产精华液网站w| 亚洲高清视频的网址| 国产一区二区在线电影| 欧美性色黄大片| 中日韩av电影| 蜜芽一区二区三区| 91国偷自产一区二区使用方法| 精品国产三级电影在线观看| 综合亚洲深深色噜噜狠狠网站| 美女网站色91| 欧美视频在线一区二区三区 | 激情伊人五月天久久综合| 一本久道中文字幕精品亚洲嫩| 精品国产髙清在线看国产毛片| 亚洲一级在线观看| 91亚洲精品一区二区乱码| 久久蜜桃一区二区| 久久精品国产一区二区| 欧美日韩亚洲国产综合| 亚洲欧美成人一区二区三区| 国产成人av电影免费在线观看| 欧美一区日本一区韩国一区| 夜夜亚洲天天久久| 91麻豆免费在线观看| 国产精品嫩草影院av蜜臀| 国产一区视频导航| 欧美xxxxxxxxx| 日本在线不卡一区| 欧美日韩免费一区二区三区 | 中文字幕一区二区5566日韩| 黄色精品一二区| 精品剧情在线观看| 久久国产夜色精品鲁鲁99| 91麻豆精品国产91久久久资源速度| 一区二区三区中文字幕| 99久精品国产| 亚洲免费观看高清| 91国偷自产一区二区三区成为亚洲经典 | 国产亚洲精品福利| 国产精品白丝jk白祙喷水网站 |