Package org.apache.groovy.xml.util
Class JacksonHelper
java.lang.Object
org.apache.groovy.xml.util.JacksonHelper
Internal helper for optional Jackson databinding support.
Uses reflection to avoid a compile-time dependency on jackson-databind.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TconvertMapToType(Map<String, Object> map, Class<T> type) Converts a Map to a typed object using Jackson's ObjectMapper.convertValue.
-
Constructor Details
-
JacksonHelper
public JacksonHelper()
-
-
Method Details
-
convertMapToType
Converts a Map to a typed object using Jackson's ObjectMapper.convertValue. Requires jackson-databind on the classpath.- Type Parameters:
T- the target type- Parameters:
map- the source maptype- the target type- Returns:
- the converted object
- Throws:
XmlRuntimeException- if jackson-databind is not available or conversion fails
-