code: public String formatMap2JSON(Map<String, Object> map) {
  		StringWriter stringWriter = new StringWriter();
  		String json = "";
  		try {
  			JsonGenerator gen = new JsonFactory()
  					.createJsonGenerator(stringWriter);
  			MAPPER.writeValue(gen, map);
  			gen.close();
  			json = stringWriter.toString();
  		} catch (Exception e) {
  			LOGGER.error("", e);
  		}
  		return json;
  	}
docs: 将map转化为json
  
  @param map
  @return