Home
last modified time | relevance | path

Searched refs:DeserializationFeature (Results 1 – 25 of 103) sorted by relevance

12345

/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/cfg/
DDeserializationConfigTest.java26 assertFalse(cfg.isEnabled(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS)); in testFeatureDefaults()
27 assertFalse(cfg.isEnabled(DeserializationFeature.USE_BIG_INTEGER_FOR_INTS)); in testFeatureDefaults()
29 assertTrue(cfg.isEnabled(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)); in testFeatureDefaults()
35 …assertTrue(config.hasDeserializationFeatures(DeserializationFeature.EAGER_DESERIALIZER_FETCH.getMa… in testBasicFeatures()
36 …assertFalse(config.hasDeserializationFeatures(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY.… in testBasicFeatures()
37 … assertTrue(config.hasSomeOfFeatures(DeserializationFeature.EAGER_DESERIALIZER_FETCH.getMask() in testBasicFeatures()
38 + DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY.getMask())); in testBasicFeatures()
39 …assertFalse(config.hasSomeOfFeatures(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY.getMask()… in testBasicFeatures()
55 assertNotSame(config, config.with(DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT, in testBasicFeatures()
56 DeserializationFeature.FAIL_ON_MISSING_CREATOR_PROPERTIES)); in testBasicFeatures()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/jdk/
DEnumDeserializationTest.java289 m.configure(DeserializationFeature.READ_ENUMS_USING_TO_STRING, true); in testToStringEnums()
297 …assertFalse(MAPPER.getDeserializationConfig().isEnabled(DeserializationFeature.FAIL_ON_NUMBERS_FOR… in testNumbersToEnums()
303 .with(DeserializationFeature.FAIL_ON_NUMBERS_FOR_ENUMS); in testNumbersToEnums()
362 … ObjectReader reader = MAPPER.reader(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL); in testAllowUnknownEnumValuesReadAsNull()
373 … ObjectReader reader = MAPPER.reader(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL); in testAllowUnknownEnumValuesReadAsNullWithCreatorMethod()
380 … ObjectReader reader = MAPPER.reader(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL); in testAllowUnknownEnumValuesForEnumSets()
388 … ObjectReader reader = MAPPER.reader(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL); in testAllowUnknownEnumValuesAsMapKeysReadAsNull()
396 assertFalse(MAPPER.isEnabled(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL)); in testDoNotAllowUnknownEnumValuesAsMapKeysWhenReadAsNullDisabled()
409 mapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, true); in testEnumsWithEmpty()
428 .with(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS) in testUnwrappedEnum()
[all …]
DEnumAltIdTest.java11 import com.fasterxml.jackson.databind.DeserializationFeature;
99 .with(DeserializationFeature.READ_ENUMS_USING_TO_STRING); in testFailWhenCaseSensitiveAndToStringIsUpperCase()
116 .with(DeserializationFeature.READ_ENUMS_USING_TO_STRING); in testEnumDesIgnoringCaseWithUpperCaseToString()
190 .with(DeserializationFeature.READ_ENUMS_USING_TO_STRING); in testEnumWithAliasAndToStringSupported()
204 .with(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE); in testEnumWithAliasAndDefaultForUnknownValueEnabled()
DEnumMapDeserializationTest.java116 .with(DeserializationFeature.READ_ENUMS_USING_TO_STRING); in testToStringEnumMaps()
203 .with(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE) in testUnknownKeyAsDefault()
210 .with(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE) in testUnknownKeyAsDefault()
222 .with(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL) in testUnknownKeyAsNull()
229 .with(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL) in testUnknownKeyAsNull()
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/jsontype/ext/
DTestSubtypesExternalPropertyMissingProperty.java123 MAPPER.disable(DeserializationFeature.FAIL_ON_MISSING_EXTERNAL_TYPE_ID_PROPERTY); in testDeserializationPresent()
127 MAPPER.enable(DeserializationFeature.FAIL_ON_MISSING_EXTERNAL_TYPE_ID_PROPERTY); in testDeserializationPresent()
137 MAPPER.disable(DeserializationFeature.FAIL_ON_MISSING_EXTERNAL_TYPE_ID_PROPERTY); in testDeserializationNull()
141 MAPPER.enable(DeserializationFeature.FAIL_ON_MISSING_EXTERNAL_TYPE_ID_PROPERTY); in testDeserializationNull()
151 MAPPER.disable(DeserializationFeature.FAIL_ON_MISSING_EXTERNAL_TYPE_ID_PROPERTY); in testDeserializationEmpty()
155 MAPPER.enable(DeserializationFeature.FAIL_ON_MISSING_EXTERNAL_TYPE_ID_PROPERTY); in testDeserializationEmpty()
165 MAPPER.disable(DeserializationFeature.FAIL_ON_MISSING_EXTERNAL_TYPE_ID_PROPERTY); in testDeserializationMissing()
169 MAPPER.enable(DeserializationFeature.FAIL_ON_MISSING_EXTERNAL_TYPE_ID_PROPERTY); in testDeserializationMissing()
179 MAPPER.disable(DeserializationFeature.FAIL_ON_MISSING_EXTERNAL_TYPE_ID_PROPERTY); in testDeserializationMissingRequired()
183 MAPPER.enable(DeserializationFeature.FAIL_ON_MISSING_EXTERNAL_TYPE_ID_PROPERTY); in testDeserializationMissingRequired()
/external/jackson-databind/src/main/java/com/fasterxml/jackson/databind/
DDeserializationConfig.java26 extends MapperConfigBase<DeserializationFeature, DeserializationConfig>
33 …private final static int DESER_FEATURE_DEFAULTS = collectFeatureDefaults(DeserializationFeature.cl…
357 public DeserializationConfig with(DeserializationFeature feature) in with()
370 public DeserializationConfig with(DeserializationFeature first, in with()
371 DeserializationFeature... features) in with()
374 for (DeserializationFeature f : features) { in with()
387 public DeserializationConfig withFeatures(DeserializationFeature... features) in withFeatures()
390 for (DeserializationFeature f : features) { in withFeatures()
403 public DeserializationConfig without(DeserializationFeature feature) in without()
416 public DeserializationConfig without(DeserializationFeature first, in without()
[all …]
DDeserializationFeature.java20 public enum DeserializationFeature implements ConfigFeature enum
495 private DeserializationFeature(boolean defaultState) { in DeserializationFeature() method in DeserializationFeature
DObjectReader.java389 public ObjectReader with(DeserializationFeature feature) { in with()
397 public ObjectReader with(DeserializationFeature first, in with()
398 DeserializationFeature... other) in with()
407 public ObjectReader withFeatures(DeserializationFeature... features) { in withFeatures()
415 public ObjectReader without(DeserializationFeature feature) { in without()
423 public ObjectReader without(DeserializationFeature first, in without()
424 DeserializationFeature... other) { in without()
432 public ObjectReader withoutFeatures(DeserializationFeature... features) { in withoutFeatures()
946 public boolean isEnabled(DeserializationFeature f) { in isEnabled()
2012 if (_config.isEnabled(DeserializationFeature.FAIL_ON_TRAILING_TOKENS)) { in _bind()
[all …]
/external/jackson-databind/src/main/java/com/fasterxml/jackson/databind/deser/std/
DEnumDeserializer.java187 if (ctxt.isEnabled(DeserializationFeature.FAIL_ON_NUMBERS_FOR_ENUMS)) { in deserialize()
196 … && ctxt.isEnabled(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE)) { in deserialize()
199 if (!ctxt.isEnabled(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL)) { in deserialize()
212 … CompactStringObjectMap lookup = ctxt.isEnabled(DeserializationFeature.READ_ENUMS_USING_TO_STRING) in deserialize()
235 if (ctxt.isEnabled(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT)) { in _deserializeAltString()
245 } else if (!ctxt.isEnabled(DeserializationFeature.FAIL_ON_NUMBERS_FOR_ENUMS)) { in _deserializeAltString()
266 … && ctxt.isEnabled(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE)) { in _deserializeAltString()
269 if (!ctxt.isEnabled(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL)) { in _deserializeAltString()
DStdDeserializer.java52 DeserializationFeature.USE_BIG_INTEGER_FOR_INTS.getMask()
53 | DeserializationFeature.USE_LONG_FOR_INTS.getMask();
57 DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS.getMask() |
58 DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT.getMask();
201 final boolean unwrap = ctxt.isEnabled(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS); in _deserializeFromArray()
239 if (ctxt.isEnabled(DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT)) { in _deserializeFromEmpty()
411 if (ctxt.isEnabled(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS)) { in _parseBooleanPrimitive()
580 if (ctxt.isEnabled(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS)) { in _parseBytePrimitive()
648 if (ctxt.isEnabled(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS)) { in _parseShortPrimitive()
713 if (ctxt.isEnabled(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS)) { in _parseIntPrimitive()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/jsontype/
DTestPolymorphicWithDefaultImpl.java202 mapper.disable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE); in testBadTypeAsNull()
212 DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, in testInvalidTypeId511()
213 DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, in testInvalidTypeId511()
214 DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES in testInvalidTypeId511()
235 DeserializationFeature.FAIL_ON_INVALID_SUBTYPE); in testUnknownTypeIDRecovery()
253 mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); in testUnknownClassAsSubtype()
264 .without(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT); in testWithoutEmptyStringAsNullObject1533()
277 .with(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT); in testWithEmptyStringAsNullObject1533()
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/validate/
DFullStreamReadTest.java8 import com.fasterxml.jackson.databind.DeserializationFeature;
38 assertFalse(MAPPER.isEnabled(DeserializationFeature.FAIL_ON_TRAILING_TOKENS)); in testMapperAcceptTrailing()
65 .enable(DeserializationFeature.FAIL_ON_TRAILING_TOKENS); in testMapperFailOnTrailing()
66 assertTrue(strict.isEnabled(DeserializationFeature.FAIL_ON_TRAILING_TOKENS)); in testMapperFailOnTrailing()
116 .enable(DeserializationFeature.FAIL_ON_TRAILING_TOKENS); in testMapperFailOnTrailingWithNull()
171 assertFalse(R.isEnabled(DeserializationFeature.FAIL_ON_TRAILING_TOKENS)); in testReaderAcceptTrailing()
184 ObjectReader strictR = MAPPER.reader().with(DeserializationFeature.FAIL_ON_TRAILING_TOKENS); in testReaderFailOnTrailing()
242 ObjectReader strictR = MAPPER.reader().with(DeserializationFeature.FAIL_ON_TRAILING_TOKENS); in testReaderFailOnTrailingWithNull()
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/
DObjectMapperTest.java119 assertTrue(m.isEnabled(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)); in testCopy()
120 m.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); in testCopy()
121 assertFalse(m.isEnabled(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)); in testCopy()
131 assertFalse(m2.isEnabled(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)); in testCopy()
132 m2.enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); in testCopy()
133 assertTrue(m2.isEnabled(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)); in testCopy()
137 assertFalse(m.isEnabled(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)); in testCopy()
140 assertFalse(m.isEnabled(DeserializationFeature.UNWRAP_ROOT_VALUE)); in testCopy()
141 assertFalse(m2.isEnabled(DeserializationFeature.UNWRAP_ROOT_VALUE)); in testCopy()
142 m.enable(DeserializationFeature.UNWRAP_ROOT_VALUE); in testCopy()
[all …]
DObjectReaderTest.java177 r = r.withoutFeatures(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES, in testFeatureSettings()
178 DeserializationFeature.FAIL_ON_INVALID_SUBTYPE); in testFeatureSettings()
179 assertFalse(r.isEnabled(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES)); in testFeatureSettings()
180 assertFalse(r.isEnabled(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE)); in testFeatureSettings()
181 r = r.withFeatures(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES, in testFeatureSettings()
182 DeserializationFeature.FAIL_ON_INVALID_SUBTYPE); in testFeatureSettings()
183 assertTrue(r.isEnabled(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES)); in testFeatureSettings()
184 assertTrue(r.isEnabled(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE)); in testFeatureSettings()
187 assertSame(r, r.with(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES, in testFeatureSettings()
188 DeserializationFeature.FAIL_ON_INVALID_SUBTYPE)); in testFeatureSettings()
[all …]
DTestRootName.java146 result = mapper.readerFor(Bean.class).with(DeserializationFeature.UNWRAP_ROOT_VALUE) in testReconfiguringOfWrapping()
153 result = mapper.readerFor(Bean.class).with(DeserializationFeature.UNWRAP_ROOT_VALUE) in testReconfiguringOfWrapping()
203 .enable(DeserializationFeature.UNWRAP_ROOT_VALUE)
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/convert/
DCoerceEmptyArrayTest.java27 .with(DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT);
76 … assertFalse(DEFAULT_MAPPER.isEnabled(DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT)); in testSettings()
77 … assertFalse(DEFAULT_READER.isEnabled(DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT)); in testSettings()
78 …assertTrue(READER_WITH_ARRAYS.isEnabled(DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT)); in testSettings()
103 .enable(DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT) in testPOJOFromEmptyArray()
111 .disable(DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT) in testPOJOFromEmptyArray()
/external/jackson-databind/src/main/java/com/fasterxml/jackson/databind/cfg/
DCoercionConfigs.java7 import com.fasterxml.jackson.databind.DeserializationFeature;
196 return config.isEnabled(DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT) ? in findCoercion()
202 return config.isEnabled(DeserializationFeature.ACCEPT_FLOAT_AS_INT) ? in findCoercion()
225 … || config.isEnabled(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT)) { in findCoercion()
304 return config.isEnabled(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT) ? in findCoercionFromBlankString()
DMapperBuilder.java70 public boolean isEnabled(DeserializationFeature f) { in isEnabled()
134 public B enable(DeserializationFeature... features) { in enable()
135 for (DeserializationFeature f : features) { in enable()
141 public B disable(DeserializationFeature... features) { in disable()
142 for (DeserializationFeature f : features) { in disable()
148 public B configure(DeserializationFeature feature, boolean state) { in configure()
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/creators/
DTestCreatorNullPrimitives.java6 import com.fasterxml.jackson.databind.DeserializationFeature;
47 .with(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES); in testCreatorNullPrimitive()
61 .with(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES); in testCreatorNullPrimitiveInNestedObject()
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/
DIncludeWithDeserTest.java9 import com.fasterxml.jackson.databind.DeserializationFeature;
137 r = r.with(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES); in testIncludeIgnoredAndUnrecognizedField()
154 r = r.without(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); in testIncludeIgnoredAndUnrecognizedField()
155 r = r.without(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES); in testIncludeIgnoredAndUnrecognizedField()
DReadOnlyDeserFailOnUnknown2719Test.java35 r = r.with(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES); in testFailOnIgnore()
44 r = r.with(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES); in testFailOnIgnore()
DTestGenerics.java83 mapper.enable(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS); in testGenericWrapperWithSingleElementArray()
123 mapper.enable(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS); in testMultipleWrappersSingleValueArray()
165 mapper.enable(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS); in testArrayOfGenericWrappersSingleValueArray()
/external/jackson-databind/src/main/java/com/fasterxml/jackson/databind/deser/impl/
DPropertyValueBuffer.java8 import com.fasterxml.jackson.databind.DeserializationFeature;
134 … if (value == null && _context.isEnabled(DeserializationFeature.FAIL_ON_NULL_CREATOR_PROPERTIES)) { in getParameter()
171 if (_context.isEnabled(DeserializationFeature.FAIL_ON_NULL_CREATOR_PROPERTIES)) { in getParameters()
197 if (_context.isEnabled(DeserializationFeature.FAIL_ON_MISSING_CREATOR_PROPERTIES)) { in _findMissing()
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/builder/
DBuilderErrorHandling.java4 import com.fasterxml.jackson.databind.DeserializationFeature;
61 .without(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) in testUnknownProperty()
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/struct/
DTestForwardReference.java8 import com.fasterxml.jackson.databind.DeserializationFeature;
18 .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)

12345