tools.jackson.databind.JacksonModule that adds support for Guava types.
Current configurability includes:
configureAbsentsAsNulls (default: false):
Determines whether inclusion strategy of NON_NULL should additionally consider
Optional.absent() values (as POJO properties) to be excluded; if true, they will
be excluded, if false, they will be included.
Note that the defaults for other "Optional" types are different; Guava setting is chosen solely
for backwards compatibility.
| Modifier and Type | Field and Description |
|---|---|
| protected boolean | _cfgHandleAbsentAsNull
Configuration setting that determines whether `Optional.absent()` is considered "same as null" for serialization purposes; that is, to be filtered same as nulls are. |
| protected BoundType | |
| private final String | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public GuavaModule | Returns: This module instance, useful for chaining callsConfiguration method that may be used to change configuration setting
|
| public GuavaModule | Returns: This module instance, useful for chaining callsConfiguration method that may be used to change the |
| public String | getModuleName()
Implements abstract tools. Method that returns a display that can be used by Jackson for informational purposes, as well as in associating extensions with module that provides them. |
| public void | setupModule(JacksonModule.
Implements abstract tools. Method called by |
| public Version | version()
Implements abstract tools. Implements tools. Method that returns version of this module. |
| _cfgHandleAbsentAsNull | back to summary |
|---|---|
| protected boolean _cfgHandleAbsentAsNull Configuration setting that determines whether `Optional.absent()` is considered "same as null" for serialization purposes; that is, to be filtered same as nulls are. If enabled, absent values are treated like nulls; if disabled, they are not. In either case, absent values are always considered "empty". Default value is `false` (NOTE: in 2.x it defaulted to `true`) Note that this setting MUST be changed BEFORE registering the module: changes after registration will have no effect. | |
| _defaultBoundType | back to summary |
|---|---|
| protected BoundType _defaultBoundType | |
| NAME | back to summary |
|---|---|
| private final String NAME | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| GuavaModule | back to summary |
|---|---|
| public GuavaModule() | |
| configureAbsentsAsNulls | back to summary |
|---|---|
| public GuavaModule configureAbsentsAsNulls(boolean state) Configuration method that may be used to change configuration setting
| |
| defaultBoundType | back to summary |
|---|---|
| public GuavaModule defaultBoundType(BoundType boundType) Configuration method that may be used to change the
| |
| getModuleName | back to summary |
|---|---|
| public String getModuleName() Implements abstract tools. Doc from tools. Method that returns a display that can be used by Jackson for informational purposes, as well as in associating extensions with module that provides them.
| |
| setupModule | back to summary |
|---|---|
| public void setupModule(JacksonModule. Implements abstract tools. Doc from tools. Method called by
| |
| version | back to summary |
|---|---|
| public Version version() Implements abstract tools. Implements tools. Doc from tools. Method that returns version of this module. Can be used by Jackson for informational purposes.
| |