public class ObjectMappers extends Object
Modifier and Type | Field and Description |
---|---|
static com.fasterxml.jackson.databind.ObjectReader |
READER |
static com.fasterxml.jackson.databind.ObjectReader |
READER_INTERNED
ObjectReader that interns custom objects on serialization, like UnconfiguredBuildTarget
|
static com.fasterxml.jackson.databind.ObjectReader |
READER_WITH_TYPE
ObjectReader that deserializes objects that had type information preserved
|
static com.fasterxml.jackson.databind.ObjectWriter |
WRITER |
static com.fasterxml.jackson.databind.ObjectWriter |
WRITER_WITH_TYPE
ObjectWrite that serializes objects along with their type information
|
Modifier and Type | Method and Description |
---|---|
static <T> T |
convertValue(Map<String,Object> map,
Class<T> clazz) |
static com.fasterxml.jackson.core.JsonGenerator |
createGenerator(OutputStream stream) |
static com.fasterxml.jackson.core.JsonParser |
createParser(byte[] json) |
static com.fasterxml.jackson.core.JsonParser |
createParser(InputStream stream) |
static com.fasterxml.jackson.core.JsonParser |
createParser(Path path) |
static com.fasterxml.jackson.core.JsonParser |
createParser(Reader reader) |
static com.fasterxml.jackson.core.JsonParser |
createParser(String json) |
static com.fasterxml.jackson.databind.ObjectMapper |
createWithEmptyBeansPermitted()
Creates an
ObjectMapper that allows to use objects without fields. |
static <T> java.util.function.Function<String,T> |
fromJsonFunction(Class<T> type) |
static com.fasterxml.jackson.databind.ObjectMapper |
legacyCreate() |
static <T> T |
readValue(Path file,
Class<T> clazz) |
static <T> T |
readValue(Path file,
com.fasterxml.jackson.core.type.TypeReference<T> clazz) |
static <T> T |
readValue(String json,
Class<T> clazz) |
static <T> T |
readValue(String json,
com.fasterxml.jackson.core.type.TypeReference<T> clazz) |
static <T> java.util.function.Function<T,String> |
toJsonFunction() |
public static final com.fasterxml.jackson.databind.ObjectReader READER
public static final com.fasterxml.jackson.databind.ObjectWriter WRITER
public static final com.fasterxml.jackson.databind.ObjectReader READER_WITH_TYPE
public static final com.fasterxml.jackson.databind.ObjectWriter WRITER_WITH_TYPE
public static final com.fasterxml.jackson.databind.ObjectReader READER_INTERNED
public static <T> T readValue(Path file, Class<T> clazz) throws IOException
IOException
public static <T> T readValue(Path file, com.fasterxml.jackson.core.type.TypeReference<T> clazz) throws IOException
IOException
public static <T> T readValue(String json, Class<T> clazz) throws IOException
IOException
public static <T> T readValue(String json, com.fasterxml.jackson.core.type.TypeReference<T> clazz) throws IOException
IOException
public static com.fasterxml.jackson.core.JsonParser createParser(Path path) throws IOException
IOException
public static com.fasterxml.jackson.core.JsonParser createParser(String json) throws IOException
IOException
public static com.fasterxml.jackson.core.JsonParser createParser(byte[] json) throws IOException
IOException
public static com.fasterxml.jackson.core.JsonParser createParser(InputStream stream) throws IOException
IOException
public static com.fasterxml.jackson.core.JsonParser createParser(Reader reader) throws IOException
IOException
public static com.fasterxml.jackson.core.JsonGenerator createGenerator(OutputStream stream) throws IOException
IOException
public static <T> java.util.function.Function<T,String> toJsonFunction()
public static <T> java.util.function.Function<String,T> fromJsonFunction(Class<T> type)
public static com.fasterxml.jackson.databind.ObjectMapper legacyCreate()
public static com.fasterxml.jackson.databind.ObjectMapper createWithEmptyBeansPermitted()
ObjectMapper
that allows to use objects without fields.SerializationFeature.FAIL_ON_EMPTY_BEANS