public abstract class Jackson2Utils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Jackson2Utils.RuntimeJsonProcessingException |
| Modifier and Type | Method and Description |
|---|---|
static com.fasterxml.jackson.databind.ObjectMapper |
customize(Jackson2Properties properties,
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Setup a Mapper.
|
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 |
isJackson2Present() |
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 com.fasterxml.jackson.databind.ObjectMapper customize(Jackson2Properties properties, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
properties - jackson2PropertiesobjectMapper - ObjectMapper or XmlMapper to customizepublic 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 Boolean isJackson2Present()
public 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 © 2018. All rights reserved.