com.amazonaws.util.json
Enum Jackson
java.lang.Object
java.lang.Enum<Jackson>
com.amazonaws.util.json.Jackson
- All Implemented Interfaces:
- Serializable, Comparable<Jackson>
public enum Jackson
- extends Enum<Jackson>
values
public static Jackson[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (Jackson c : Jackson.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static Jackson valueOf(String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name
- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
toJsonPrettyString
public static String toJsonPrettyString(Object value)
toJsonString
public static String toJsonString(Object value)
fromJsonString
public 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.
jsonNodeOf
public static com.fasterxml.jackson.databind.JsonNode jsonNodeOf(String json)
jsonGeneratorOf
public static com.fasterxml.jackson.core.JsonGenerator jsonGeneratorOf(Writer writer)
throws IOException
- Throws:
IOException
loadFrom
public static <T> T loadFrom(File file,
Class<T> clazz)
throws IOException
- Throws:
IOException
getObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
getWriter
public static com.fasterxml.jackson.databind.ObjectWriter getWriter()
getPrettywriter
public static com.fasterxml.jackson.databind.ObjectWriter getPrettywriter()
Copyright © 2016. All rights reserved.