Package org.apache.groovy.xml.util

# Class JacksonHelper

java.lang.Object
org.apache.groovy.xml.util.JacksonHelper

public class JacksonHelper extends Object
Internal helper for optional Jackson databinding support. Uses reflection to avoid a compile-time dependency on jackson-databind.

Since:
  6.0.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JacksonHelper()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <T> T`
  `convertMapToType(Map<String,Object> map, Class<T> type)`
  Converts a Map to a typed object using Jackson's ObjectMapper.convertValue.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### JacksonHelper

    public JacksonHelper()

- ## Method Details

  - ### convertMapToType

    public static <T> T convertMapToType(Map<String,Object> map, Class<T> type)
    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 map
      `type` - the target type
    Returns:
      the converted object
    Throws:
      `XmlRuntimeException` - if jackson-databind is not available or conversion fails