淘先锋技术网

首页 1 2 3 4 5 6 7
public static <T> T fromJson(String json, Class<T> valueType){
		try {
			mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
			return null == json ? null : mapper.readValue(json, valueType);
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}