As of Jackson 1.8, usage should be done using instance configured via {@link com.facebook.presto.hive.shaded.org.codehaus.jackson.map.ObjectMapper} (and exposed through{@link com.facebook.presto.hive.shaded.org.codehaus.jackson.map.DeserializationConfig} and{@link com.facebook.presto.hive.shaded.org.codehaus.jackson.map.SerializationConfig}). However, old static-singleton access methods are supported as well; however, using those may cause issues with extension modules that register "type enchancers".
Typical usage pattern before Jackson 1.8 was to statically import factory methods of this class, to allow convenient instantiation of structured types, especially {@link Collection} and {@link Map} typesto represent generic types. For example
mapType(String.class, Integer.class)to represent
Map<String,Integer>This is an alternative to using {@link TypeReference} that wouldbe something like
new TypeReference<Map<String,Integer>>() { }
|
|