snaker-core/src/main/java/org/snaker/engine/helper/JsonHelper.java
public static <T> T fromJson(String jsonString, Class<T> clazz) {
		if (StringHelper.isEmpty(jsonString)) {
			return null;
		}

		try {
			return mapper.readValue(jsonString, clazz);
		} catch (Exception e) {
			log.warn("parse json string error:" + jsonString, e);
			return null;
		}
	}
public static <T> T fromJson(String jsonString, Class<T> clazz) {
		if (StringHelper.isEmpty(jsonString)) {
			return null;
		}

		try {
			return mapper.readValue(jsonString, clazz);
		} catch (Exception e) {
			log.warn("parse json string error:" + jsonString, e);
			return null;
		}
	}
public static < T > T fromJson ( String jsonString , Class < T > clazz ) { if ( StringHelper . isEmpty ( jsonString ) ) { return null ; } try { return mapper . readValue ( jsonString , clazz ) ; } catch ( Exception e ) { log . warn ( "parse json string error:" + jsonString , e ) ; return null ; } }
根据指定类型解析json字符串，并返回该类型的对象
@param jsonString
@param clazz
@return
根据指定类型解析json字符串，并返回该类型的对象