package com.trs.project.test;


import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

import java.sql.SQLException;


public class Test3 {
    public static void main(String[] args) throws SQLException {

        System.out.println(3/2);
        System.out.println((double)3/2);
        //(int)Math.ceil((double)3/2);
        System.out.println((int)Math.ceil((double)3/2));
        String jsonStr = "[{\"GROUPID\":\"14\",\"PUBLISHURL\":\"http://www.keerqin.gov.cn/jlhd/wszx/202311/tGovMsgBox_4979.html\",\"SITEID\":\"9\"}]";
        JSONArray jsonArr = JSON.parseArray(jsonStr);
        if(jsonArr.size()>0){
            String firstJson = jsonArr.get(0).toString();
            String publishUrl = JSON.parseObject(firstJson).getString("PUBLISHURL");
        }
        String firstJson = jsonArr.get(0).toString();
        String publishUrl = JSON.parseObject(firstJson).getString("PUBLISHURL");
        System.out.println(publishUrl);
    }


}
