public static class JsonDeserializationContext.Builder extends Object
| Constructor and Description |
|---|
JsonDeserializationContext.Builder() |
| Modifier and Type | Method and Description |
|---|---|
JsonDeserializationContext.Builder |
acceptSingleValueAsArray(boolean acceptSingleValueAsArray)
Feature that determines whether it is acceptable to coerce non-array
(in JSON) values to work with Java collection (arrays, java.util.Collection)
types.
|
JsonDeserializationContext |
build() |
JsonDeserializationContext.Builder |
failOnUnknownProperties(boolean failOnUnknownProperties)
Determines whether encountering of unknown
properties (ones that do not map to a property, and there is
no "any setter" or handler that can handle it)
should result in a failure (by throwing a
JsonDeserializationException) or not. |
JsonDeserializationContext.Builder |
unwrapRootValue(boolean unwrapRootValue)
Feature to allow "unwrapping" root-level JSON value, to match setting of
JsonSerializationContext.Builder.wrapRootValue(boolean) used for serialization. |
JsonDeserializationContext.Builder |
wrapExceptions(boolean wrapExceptions)
Feature that determines whether gwt-jackson code should catch
and wrap
RuntimeExceptions (but never Errors!)
to add additional information about
location (within input) of problem or not. |
public JsonDeserializationContext.Builder failOnUnknownProperties(boolean failOnUnknownProperties)
JsonDeserializationException) or not.
This setting only takes effect after all other handling
methods for unknown properties have been tried, and
property remains unhandled.
Feature is enabled by default (meaning that a
JsonDeserializationException will be thrown if an unknown property
is encountered).public JsonDeserializationContext.Builder unwrapRootValue(boolean unwrapRootValue)
JsonSerializationContext.Builder.wrapRootValue(boolean) used for serialization.
Will verify that the root JSON value is a JSON Object, and that it has
a single property with expected root name. If not, a
JsonDeserializationException is thrown; otherwise value of the wrapped property
will be deserialized as if it was the root value.
Feature is disabled by default.public JsonDeserializationContext.Builder acceptSingleValueAsArray(boolean acceptSingleValueAsArray)
public JsonDeserializationContext.Builder wrapExceptions(boolean wrapExceptions)
RuntimeExceptions (but never Errors!)
to add additional information about
location (within input) of problem or not. If enabled,
exceptions will be caught and re-thrown; this can be
convenient both in that all exceptions will be checked and
declared, and so there is more contextual information.
However, sometimes calling application may just want "raw"
unchecked exceptions passed as is.
public JsonDeserializationContext build()
Copyright © 2014. All Rights Reserved.