import org.json.*; String response=prev.getResponseDataAsString(); JSONObject data_obj=new JSONObject(response); String data_1=data_obj.get("data").toString(); JSONObject data_2=new JSONObject(data_1); String order_no=data_2.get("order_txn_reference").toString(); log.info("order_txn_reference is:"+order_no); FileWriter file=new FileWriter("D:\\123.csv",true); BufferedWriter out = new BufferedWriter(file); out.write(order_no+"\n"); out.close(); file.close();
标签:http,JSONObject,出参,response,file,new,CSV,data,order From: https://www.cnblogs.com/yan-test/p/16739283.html