Code example for JsonReader

Methods: beginObjectnextName

0
	 * @param in 
	 * @throws Exception 
	 */ 
	public static void readJsonData(InputStream in,String json) throws Exception {
		//JsonReader reader = new JsonReader(new InputStreamReader(in, "UTF-8")); 
		JsonReader reader = new JsonReader(new StringReader(json));
		try { 
			reader.beginObject();
			String tagName = reader.nextName();
			if (tagName.equals("info")) {
				readInfo(reader);
			} 
			reader.endObject();
		} finally { 
			reader.close();
		} 
	} 
	/** 
	 * 读取json的父(根,第一个)节点 
	 * @param reader