package Practice_test;

import java.util.Iterator;
import java.util.Set;

import com.beust.jcommander.Parameter;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;


public class t1 {

	public static String  killQuotes(String parameter, String letter){
		StringBuffer sb=new StringBuffer();
		for(int k=0;k<parameter.length();k++){
			if(parameter.charAt(k)!= '"'){
				sb.append(parameter.charAt(k));
			}
		}
		return sb.toString();
	}	
	public static void main(String[] args) {
		
		String parameter = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo4NTgxOCwiYXJlYV9jb2RlIjoiODYiLCJwaG9uZSI6IjE4MzM5OTcwOTI1IiwiY3JlYXRlX3RpbWUiOjE1NDMxOTYyMjIsInVwZGF0ZV90aW1lIjoxNTQ1MDI1Mjk0LCJzeXN0ZW0iOiJCTEEtQUwwMEhVQVdFSSIsInBsYXRmb3JtIjoiQW5kcm9pZCIsImlwIjoiNjEuMTQ5LjIwLjExNCIsInZlcnNpb24iOiIxIiwiZGV2aWNlX2lkIjoiODY2MjE3MDM3MjkxNzk5IiwicGFzc3dkIjoiM2I1MDY1ZGRiYzhiMWRjMDM2ZmZkMzg4NDYzZTRlYmIiLCJuaWNrbmFtZSI6Ilx1OTUyNi4iLCJhdmF0YXIiOiJodHRwOlwvXC90aGlyZHFxLnFsb2dvLmNuXC9xcWFwcFwvMTEwNjc3MzY4MVwvNjFDQkEwNzhBMTdCMjVERjk4MENEMDFBMjNGQjdBNDZcLzEwMCIsImdlbmRlciI6ImYiLCJxcV9pZCI6IjYxQ0JBMDc4QTE3QjI1REY5ODBDRDAxQTIzRkI3QTQ2Iiwid2VpYm9faWQiOiIiLCJ3ZWl4aW5faWQiOiIiLCJ1bmlvbl9pZCI6IiIsIndlaWJvX25pY2tuYW1lIjoiIiwicXFfbmlja25hbWUiOiJcdTk1MjYuIiwid2VpeGluX25pY2tuYW1lIjoiIiwid2VpYm9fYXZhdGFyIjoiIiwicXFfYXZhdGFyIjoiaHR0cDpcL1wvdGhpcmRxcS5xbG9nby5jblwvcXFhcHBcLzExMDY3NzM2ODFcLzYxQ0JBMDc4QTE3QjI1REY5ODBDRDAxQTIzRkI3QTQ2XC8xMDAiLCJ3ZWl4aW5fYXZhdGFyIjoiIiwibG9naW5fdHlwZSI6InFxIiwicGhvbmVfbmFtZSI6IiIsInBob25lX2F2YXRhciI6IiIsInN0b3JlIjoib2ZmY24iLCJpZl9kZWxldGUiOjAsImV4YW1faWQiOjcxLCJpdGVtX2lkIjoxMTIsImV4YW1fYXJlYSI6Ilx1NTZmZFx1NWJiNlx1NTE2Y1x1NTJhMVx1NTQ1OFx1ODAwM1x1OGJkNSIsImlhdCI6MTU0NTAyNTMwMCwibmJmIjoxNTQ1MDI1MzAwLCJleHAiOjE1NzY1NjEzMDB9.Y-6ZSY2Tqr8xdIvKR4ThenzYt17-0vFMBN3RBFATmj8";
		String sb = killQuotes(parameter, "\"");
		System.out.println(sb);
	
		/*
		String str="{\"houseBasicInfo\": {\"address\": \"***&*&*&87\",\"area\": \"北京市\",\"cardPic\": \"cardpiccardpiccardpic\",\"city\": \"北京市\",\"contract\": \"contract\",\"contractNo\": \"100000004\",\"idNo\": \"11022119811222061X\",\"name\": \"姚帅\",\"payAmount\": 10000,\"phone\": \"13910960649\",\"rentBegin\": \"2017-07-21\",\"rentEnd\": \"2018-07-21\",\"rental\": 5000,\"rentalType\": 1,\"roomId\": \"11\",\"roomNum\": \"1101室\",\"suiteId\": \"111\",\"termNum\": 12,\"thirdUserId\": \"1\",\"timeStamp\": \"123123123\"},\"merchantName\": \"蛋壳第一商户\",\"receiveContractInfo\": {\"area\": \"北京\",\"attachment\": \"attachment\",\"city\": \"北京\",\"contractNo\": \"0000001231231231\",\"endTime\": \"2017-07-21\",\"personIdNo\": \"110102198907132328\",\"personName\": \"小五\",\"rentalAddress\": \"北京市朝阳区银河SOHO1101室\",\"startTime\": \"2018-07-21\",\"subCompany\": \"蛋壳租房\"},\"source\": 0}";
		
		 JSONObject jo = JSONObject.fromObject(str); 
		 System.out.println(jo.getString("houseBasicInfo"));
		 
		 JSONObject j1 = JSONObject.fromObject(jo.getString("houseBasicInfo"));
		 System.out.println(j1.getString("address"));
		 System.out.println(j1.getString("area"));
		 System.out.println(j1.getString("cardPic"));
		 System.out.println("====================================");
		 System.out.println(jo.getString("merchantName"));
		 System.out.println(jo.getString("receiveContractInfo"));
		 System.out.println(jo.getString("source"));*/
//		 Iterator it=jo.keys();
//		 String key=null;
//		 String value=null;
//		 while(it.hasNext()){
//			 key=(String)it.next();
//			 value=jo.getString(key);
//			 System.out.println(value);
//		 }
//		JSONObject obj = JSONObject.fromObject(str); 
//		String showapi=obj.getString("showapi_res_body");
//		JSONObject obj1 = JSONObject.fromObject(showapi); 
//		 System.out.println(obj1.get("Result"));
		 
		 
//		 JSONArray transitListArray = obj.getJSONArray("showapi_res_body");  
//		 System.out.println(transitListArray.getString("Result"));
//         for (int i = 0; i < transitListArray.size(); i++) {  
//             System.out.print("Array:" + transitListArray.getString(i) + " ");  
//         }  
//		 System.out.println(jo.getString("Result"));
		 
		 
		 
//         System.out.println(jo.get("list"));
//         JSONObject jo1 = (JSONObject)jo.get("list");
//         System.out.println(jo1.get("phone"));
         
	}
	
	
}
