import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;

/**
 * 标签同步
 */
public class TagSyncTest {

    public static void main(String[] args) {
        JSONObject json = JSONObject.parseObject(getText()) ;
        JSONArray list = json.getJSONObject("result").getJSONArray("tag_group") ;
        System.out.println(JSONArray.toJSONString(list,true));
    }


    public  static String getText(){
        try {
            BufferedReader bw = new BufferedReader(new FileReader(new File("d:\\bq.txt"))) ;
            StringBuilder sb = new StringBuilder() ;
            while(true) {
                String s =  bw.readLine() ;
                if(StringUtils.isBlank(s)) {
                    break ;
                }else {
                    String ss = new String(s.getBytes(),"UTF-8") ;
                    sb.append(ss) ;
                }
            }
            bw.close();
            return sb.toString() ;
        }catch(Exception e) {
        }
        return null ;
    }

}
