public enum Jackson extends Enum<Jackson>
Modifier and Type | Method and Description |
---|---|
static <T> T |
fromJsonString(String json,
Class<T> clazz)
Returns the deserialized object from the given json string and target
class; or null if the given json string is null.
|
static com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper() |
static com.fasterxml.jackson.databind.ObjectWriter |
getPrettywriter() |
static com.fasterxml.jackson.databind.ObjectWriter |
getWriter() |
static com.fasterxml.jackson.core.JsonGenerator |
jsonGeneratorOf(Writer writer) |
static com.fasterxml.jackson.databind.JsonNode |
jsonNodeOf(String json) |
static <T> T |
loadFrom(File file,
Class<T> clazz) |
static String |
toJsonPrettyString(Object value) |
static String |
toJsonString(Object value) |
static Jackson |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Jackson[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static Jackson[] values()
for (Jackson c : Jackson.values()) System.out.println(c);
public static Jackson valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static <T> T fromJsonString(String json, Class<T> clazz)
public static com.fasterxml.jackson.databind.JsonNode jsonNodeOf(String json)
public static com.fasterxml.jackson.core.JsonGenerator jsonGeneratorOf(Writer writer) throws IOException
IOException
public static <T> T loadFrom(File file, Class<T> clazz) throws IOException
IOException
public static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
public static com.fasterxml.jackson.databind.ObjectWriter getWriter()
public static com.fasterxml.jackson.databind.ObjectWriter getPrettywriter()
Copyright © 2018. All rights reserved.