Writer write(Writer writer)
            throws JSONException {
        try {
            boolean commanate = false;
            int length = this.length();
            writer.write('[');

            if (length == 1) {
                JSONObject.writeValue(writer, this.list.get(0));
            } else if (length != 0) {
                for (int i = 0; i < length; i += 1) {
                    if (commanate) {
                        writer.write(',');
                    }
                    JSONObject.writeValue(writer, this.list.get(i));
                    commanate = true;
                }
            }
            writer.write(']');
            return writer;
        } catch (IOException e) {
            throw new JSONException(e);
        }
    }
@author Robert HG (254963746@qq.com) on 12/28/15.
lts-core/src/main/java/com/github/ltsopensource/json/JSONArray.java