code: public static String toJson(Object obj) {
  		try {
  			return objectMapper.writeValueAsString(obj);
  		} catch (JsonProcessingException e) {
  			throw new RuntimeException(e);
  		}
  	}
docs: 将对象转换成json字符串
  @param obj
  @return