|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<SerializationConfig.Feature>
org.codehaus.jackson.map.SerializationConfig.Feature
public static enum SerializationConfig.Feature
Enumeration that defines togglable features that guide the serialization feature.
| Enum Constant Summary | |
|---|---|
AUTO_DETECT_FIELDS
Feature that determines whether non-static fields are recognized as properties. |
|
AUTO_DETECT_GETTERS
Feature that determines whether "getter" methods are automatically detected based on standard Bean naming convention or not. |
|
CAN_OVERRIDE_ACCESS_MODIFIERS
Feature that determines whether method and field access modifier settings can be overridden when accessing properties. |
|
INDENT_OUTPUT
Feature that allows enabling (or disabling) indentation for the underlying generator, using the default pretty printer (see JsonGenerator.useDefaultPrettyPrinter()
for details). |
|
WRITE_DATES_AS_TIMESTAMPS
Feature that determines whether Dates
(and Date-based things like Calendars) are to be
serialized as numeric timestamps (true; the default),
or as textual representation (false). |
|
WRITE_NULL_PROPERTIES
Deprecated. As of 1.1, use SerializationConfig.setSerializationInclusion(org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion)}
instead |
|
| Method Summary | |
|---|---|
static int |
collectDefaults()
Method that calculates bit set (flags) of all features that are enabled by default. |
boolean |
enabledByDefault()
|
int |
getMask()
|
static SerializationConfig.Feature |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static SerializationConfig.Feature[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final SerializationConfig.Feature AUTO_DETECT_GETTERS
Note that this feature has lower precedence than per-class annotations, and is only used if there isn't more granular configuration available.
Feature is enabled by default.
public static final SerializationConfig.Feature AUTO_DETECT_FIELDS
Note that this feature has lower precedence than per-class annotations, and is only used if there isn't more granular configuration available.
Feature is enabled by default.
public static final SerializationConfig.Feature CAN_OVERRIDE_ACCESS_MODIFIERS
AccessibleObject.setAccessible(java.lang.reflect.AccessibleObject[], boolean)
may be called to enable access to otherwise unaccessible
objects.
public static final SerializationConfig.Feature WRITE_NULL_PROPERTIES
SerializationConfig.setSerializationInclusion(org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion)}
insteadFeature is enabled by default (null properties written).
Note too that there is annotation
JsonWriteNullProperties
that can be used for more granular control (annotates bean
classes or individual property access methods).
public static final SerializationConfig.Feature WRITE_DATES_AS_TIMESTAMPS
Dates
(and Date-based things like Calendars) are to be
serialized as numeric timestamps (true; the default),
or as textual representation (false).
If textual representation is used, the actual format is
one returned by a call to SerializationConfig.getDateFormat().
public static final SerializationConfig.Feature INDENT_OUTPUT
JsonGenerator.useDefaultPrettyPrinter()
for details).
Note that this only affects cases where
JsonGenerator
is constructed implicitly by ObjectMapper: if explicit
generator is passed, its configuration is not changed.
Also note that if you want to configure details of indentation,
you need to directly configure the generator: there is a
method to use any PrettyPrinter instance.
This feature will only allow using the default implementation.
| Method Detail |
|---|
public static SerializationConfig.Feature[] values()
for (SerializationConfig.Feature c : SerializationConfig.Feature.values()) System.out.println(c);
public static SerializationConfig.Feature valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic static int collectDefaults()
public boolean enabledByDefault()
public int getMask()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||