锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲综合国产精品第一页,亚洲精品宾馆在线精品酒店,亚洲 另类 无码 在线http://m.tkk7.com/paulwong/category/55336.htmlzh-cnFri, 30 Oct 2020 05:17:18 GMTFri, 30 Oct 2020 05:17:18 GMT60Pretty print JSON using org.json library in Javahttp://m.tkk7.com/paulwong/archive/2020/10/28/435709.htmlpaulwongpaulwongWed, 28 Oct 2020 09:17:00 GMThttp://m.tkk7.com/paulwong/archive/2020/10/28/435709.htmlhttp://m.tkk7.com/paulwong/comments/435709.htmlhttp://m.tkk7.com/paulwong/archive/2020/10/28/435709.html#Feedback0http://m.tkk7.com/paulwong/comments/commentRss/435709.htmlhttp://m.tkk7.com/paulwong/services/trackbacks/435709.htmlSyntax
public java.lang.String toString(int indentFactor) throws JSONException

Example

import org.json.*;
public class JSONPrettyPrintTest {
   
public static void main(String args[]) throws JSONException {
      String json 
= "{" +
                    
"Name : Jai," +
                    
"Age : 25, " +
                    
"Salary: 25000.00 " +
                    
"}";
      JSONObject jsonObj 
= new JSONObject(json);
      System.out.println(
"Pretty Print of JSON:");
      System.out.println(jsonObj.toString(
4)); // pretty print json
   }
}

Output

Pretty Print of JSON:
{
   "Salary": 25000,
   "Age": 25,
   "Name": "Jai"
}


paulwong 2020-10-28 17:17 鍙戣〃璇勮
]]>
5 ways to customize Spring MVC JSON/XML outputhttp://m.tkk7.com/paulwong/archive/2020/03/08/435236.htmlpaulwongpaulwongSun, 08 Mar 2020 07:55:00 GMThttp://m.tkk7.com/paulwong/archive/2020/03/08/435236.htmlhttp://m.tkk7.com/paulwong/comments/435236.htmlhttp://m.tkk7.com/paulwong/archive/2020/03/08/435236.html#Feedback0http://m.tkk7.com/paulwong/comments/commentRss/435236.htmlhttp://m.tkk7.com/paulwong/services/trackbacks/435236.htmlhttps://mostafa-asg.github.io/post/customize-json-xml-spring-mvc-output/



paulwong 2020-03-08 15:55 鍙戣〃璇勮
]]>
浠ユ祦鐨勬柟寮忚В閲婂法澶SON鏂囦歡http://m.tkk7.com/paulwong/archive/2019/05/03/433743.htmlpaulwongpaulwongFri, 03 May 2019 07:22:00 GMThttp://m.tkk7.com/paulwong/archive/2019/05/03/433743.htmlhttp://m.tkk7.com/paulwong/comments/433743.htmlhttp://m.tkk7.com/paulwong/archive/2019/05/03/433743.html#Feedback0http://m.tkk7.com/paulwong/comments/commentRss/433743.htmlhttp://m.tkk7.com/paulwong/services/trackbacks/433743.htmlhttps://www.ngdata.com/parsing-a-large-json-file-efficiently-and-easily/


https://sites.google.com/site/gson/streaming

http://www.acuriousanimal.com/2015/10/23/reading-json-file-in-stream-mode-with-gson.html

    public static void main(String [] args) throws IOException {
        String filePath = "C:big-data.json";
        FileInputStream in = new FileInputStream(new File(filePath));
        JsonReader reader = new JsonReader(new InputStreamReader(in, "UTF-8"));
        Gson gson = new GsonBuilder().create();
//        reader.beginObject();
//        reader.nextName();
        reader.beginObject();//璺寵繃"{"
        while (reader.hasNext()) {
            // Read data into object model
            JsonToken jsonToken = reader.peek();
            if(jsonToken.equals(JsonToken.NAME)) {
                String name = reader.nextName();
                if(name.equalsIgnoreCase("SUMMARY")) {
//                    reader.beginObject();
                    Summary summary = gson.fromJson(reader, Summary.class);
                    logger.info(summary.toString());
                    break;
//                    reader.endObject();//璺寵繃"}"
                }
            } /*else if(jsonToken.equals(JsonToken.BEGIN_OBJECT)) {
                reader.beginObject();
            } else if(jsonToken.equals(JsonToken.STRING)) {
                logger.info(reader.nextString());
            } else if(jsonToken.equals(JsonToken.NUMBER)) {
                logger.info(reader.nextInt() + "");
            } else if(jsonToken.equals(JsonToken.END_OBJECT)) {
                reader.endObject();
            } 
*/
//            Summary summary = gson.fromJson(reader, Summary.class);
//            break;
        }
        reader.close();
    }


paulwong 2019-05-03 15:22 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 亚洲av无码电影网| 精品亚洲麻豆1区2区3区| 自拍偷自拍亚洲精品偷一| 成年女人毛片免费观看97| 亚洲无人区码一二三码区别图片| 99re在线免费视频| 亚洲国产成人91精品| 国产一卡2卡3卡4卡无卡免费视频 国产一卡二卡3卡四卡免费 | 亚洲AV色吊丝无码| 我们的2018在线观看免费高清 | 色天使色婷婷在线影院亚洲| 日韩特黄特色大片免费视频| 久久精品熟女亚洲av麻豆| 亚洲AV中文无码乱人伦在线视色| 日韩免费高清一级毛片| 丝袜熟女国偷自产中文字幕亚洲| 国产亚洲精品免费视频播放| 亚洲国产成人久久综合碰碰动漫3d| 99久久人妻精品免费一区| 亚洲色图激情文学| 免费A级毛片无码A| 黄色免费在线网站| 亚洲一区二区三区91| 国产精品国产免费无码专区不卡| 人人爽人人爽人人片A免费| 亚洲精品乱码久久久久久| 日韩精品无码免费一区二区三区| 亚洲大香人伊一本线| 日韩精品视频免费网址| 中文精品人人永久免费 | 亚洲成A人片777777| 久久99毛片免费观看不卡| 久久久久亚洲AV无码麻豆| 在线观看免费成人| xxxxx做受大片视频免费| 亚洲视频免费播放| 亚洲成av人在片观看| 91麻豆国产免费观看| 免费无码婬片aaa直播表情| 人人狠狠综合久久亚洲88| 永久免费AV无码网站在线观看|