com.amazonaws.util.json
Enum Jackson
java.lang.Object
java.lang.Enum<Jackson>
com.amazonaws.util.json.Jackson
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<Jackson>
public enum Jackson
- extends java.lang.Enum<Jackson>
Method Summary |
static
|
fromJsonString(java.lang.String json,
java.lang.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(java.io.Writer writer)
|
static com.fasterxml.jackson.databind.JsonNode |
jsonNodeOf(java.lang.String json)
|
static
|
loadFrom(java.io.File file,
java.lang.Class<T> clazz)
|
static java.lang.String |
toJsonPrettyString(java.lang.Object value)
|
static java.lang.String |
toJsonString(java.lang.Object value)
|
static Jackson |
valueOf(java.lang.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. |
Methods inherited from class java.lang.Enum |
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
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(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is null
toJsonPrettyString
public static java.lang.String toJsonPrettyString(java.lang.Object value)
toJsonString
public static java.lang.String toJsonString(java.lang.Object value)
fromJsonString
public static <T> T fromJsonString(java.lang.String json,
java.lang.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(java.lang.String json)
jsonGeneratorOf
public static com.fasterxml.jackson.core.JsonGenerator jsonGeneratorOf(java.io.Writer writer)
throws java.io.IOException
- Throws:
java.io.IOException
loadFrom
public static <T> T loadFrom(java.io.File file,
java.lang.Class<T> clazz)
throws java.io.IOException
- Throws:
java.io.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 © 2010 Amazon Web Services, Inc. All Rights Reserved.