
public final class Jackson2Utils extends Object
| Modifier and Type | Class and Description | 
|---|---|
| static class  | Jackson2Utils.RuntimeJsonProcessingException | 
| Modifier and Type | Method and Description | 
|---|---|
| static <T> Function<String,T> | fromJson(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
        Class<T> type)parse JSON. | 
| static <T> Function<String,T> | fromJson(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
        com.fasterxml.jackson.core.type.TypeReference<T> typeReference) | 
| static Boolean | getJackson2Present() | 
| static <T extends com.fasterxml.jackson.databind.ObjectMapper> | setupObjectMapper(org.springframework.core.env.PropertyResolver propertyResolver,
                 T objectMapper)Setup a Mapper. | 
| static <T> Function<T,String> | toJson(com.fasterxml.jackson.databind.ObjectMapper objectMapper)to JSON. | 
| static <T> String | toJson(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
      T item) | 
public static Boolean getJackson2Present()
public static <T extends com.fasterxml.jackson.databind.ObjectMapper> T setupObjectMapper(org.springframework.core.env.PropertyResolver propertyResolver,
                                                                                          T objectMapper)
T - ObjectMapper or XmlMapperpropertyResolver - propertyResolverobjectMapper - to setuppublic static <T> Function<String,T> fromJson(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.fasterxml.jackson.core.type.TypeReference<T> typeReference)
public static <T> Function<String,T> fromJson(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<T> type)
T - typeobjectMapper - objectMappertype - typepublic static <T> Function<T,String> toJson(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
T - typeobjectMapper - objectMapperpublic static <T> String toJson(com.fasterxml.jackson.databind.ObjectMapper objectMapper, T item)
Copyright © 2017. All rights reserved.