java parses json text, removes the content after // and /**/

	String text =	FileUtils.readFileToString(new File("xx.txt"));
		         
       String result= text.replaceAll("(//.*)|(/\\*[\\s\\S]*?\\*/)", "");//Use is removing json text/ Comment content after / and /* */.
	@SuppressWarnings("unchecked")
	Map<String,Object> map =	JSON.parseObject(result, Map.class);
    System.out.println(map);


ok~~~~

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325783499&siteId=291194637