/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/ser/jdk/ |
D | DateSerializationTest.java | 20 import com.fasterxml.jackson.databind.SerializationFeature; 109 assertTrue(MAPPER.isEnabled(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)); in testDateNumeric() 118 mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); in testDateISO8601() 138 .without(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); in testDateISO8601_10k() 150 .without(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); in testDateISO8601_BCE() 167 mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); in testDateISO8601_customTZ() 190 mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); in testDateISO8601_colonInTZ() 242 assertFalse(mapper.isEnabled(SerializationFeature.WRITE_DATE_KEYS_AS_TIMESTAMPS)); in testDatesAsMapKeys() 248 mapper.configure(SerializationFeature.WRITE_DATE_KEYS_AS_TIMESTAMPS, true); in testDatesAsMapKeys() 258 mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); in testDateWithJsonFormat() [all …]
|
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/ |
D | ObjectWriterTest.java | 132 .without(SerializationFeature.EAGER_SERIALIZER_FETCH); in testNoPrefetch() 142 .with(SerializationFeature.CLOSE_CLOSEABLE); in testWithCloseCloseable() 143 assertTrue(w.isEnabled(SerializationFeature.CLOSE_CLOSEABLE)); in testWithCloseCloseable() 239 ObjectWriter newW = w.with(SerializationFeature.FAIL_ON_UNWRAPPED_TYPE_IDENTIFIERS, in testFeatureSettings() 240 SerializationFeature.INDENT_OUTPUT); in testFeatureSettings() 242 assertTrue(newW.isEnabled(SerializationFeature.FAIL_ON_UNWRAPPED_TYPE_IDENTIFIERS)); in testFeatureSettings() 243 assertTrue(newW.isEnabled(SerializationFeature.INDENT_OUTPUT)); in testFeatureSettings() 244 assertSame(newW, newW.with(SerializationFeature.INDENT_OUTPUT)); in testFeatureSettings() 245 assertSame(newW, newW.withFeatures(SerializationFeature.INDENT_OUTPUT)); in testFeatureSettings() 247 newW = w.withFeatures(SerializationFeature.FAIL_ON_UNWRAPPED_TYPE_IDENTIFIERS, in testFeatureSettings() [all …]
|
D | ObjectMapperTest.java | 320 m.enable(SerializationFeature.INDENT_OUTPUT); in testCustomDefaultPrettyPrinter() 332 assertEquals("[1,2]", m.writer().without(SerializationFeature.INDENT_OUTPUT) in testCustomDefaultPrettyPrinter() 346 m.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); in testNonSerializabilityOfObject() 348 assertTrue(MAPPER.writer().without(SerializationFeature.FAIL_ON_EMPTY_BEANS) in testNonSerializabilityOfObject() 350 assertFalse(MAPPER.writer().with(SerializationFeature.FAIL_ON_EMPTY_BEANS) in testNonSerializabilityOfObject() 358 assertFalse(MAPPER.writer().with(SerializationFeature.FAIL_ON_EMPTY_BEANS) in testEmptyBeanSerializability() 361 assertTrue(MAPPER.writer().without(SerializationFeature.FAIL_ON_EMPTY_BEANS) in testEmptyBeanSerializability()
|
/external/jackson-databind/src/main/java/com/fasterxml/jackson/databind/ |
D | SerializationConfig.java | 31 extends MapperConfigBase<SerializationFeature, SerializationConfig> 41 …private final static int SER_FEATURE_DEFAULTS = collectFeatureDefaults(SerializationFeature.class); 347 return cfg.with(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); in with() 349 return cfg.without(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); in with() 362 public SerializationConfig with(SerializationFeature feature) in with() 375 public SerializationConfig with(SerializationFeature first, SerializationFeature... features) in with() 378 for (SerializationFeature f : features) { in with() 391 public SerializationConfig withFeatures(SerializationFeature... features) in withFeatures() 394 for (SerializationFeature f : features) { in withFeatures() 407 public SerializationConfig without(SerializationFeature feature) in without() [all …]
|
D | ObjectWriter.java | 273 public ObjectWriter with(SerializationFeature feature) { in with() 281 public ObjectWriter with(SerializationFeature first, SerializationFeature... other) { in with() 289 public ObjectWriter withFeatures(SerializationFeature... features) { in withFeatures() 297 public ObjectWriter without(SerializationFeature feature) { in without() 305 public ObjectWriter without(SerializationFeature first, SerializationFeature... other) { in without() 313 public ObjectWriter withoutFeatures(SerializationFeature... features) { in withoutFeatures() 907 public boolean isEnabled(SerializationFeature f) { in isEnabled() 991 if (_config.isEnabled(SerializationFeature.CLOSE_CLOSEABLE) in writeValue() 997 if (_config.isEnabled(SerializationFeature.FLUSH_AFTER_WRITE_VALUE)) { in writeValue() 1007 if (_config.isEnabled(SerializationFeature.FLUSH_AFTER_WRITE_VALUE)) { in writeValue() [all …]
|
D | SerializationFeature.java | 16 public enum SerializationFeature implements ConfigFeature enum 459 private SerializationFeature(boolean defaultState) { in SerializationFeature() method in SerializationFeature
|
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/ser/ |
D | TestConfig.java | 61 for (SerializationFeature f : SerializationFeature.values()) { in testEnumIndexes() 78 assertTrue(cfg.isEnabled(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)); in testDefaults() 80 assertFalse(cfg.isEnabled(SerializationFeature.INDENT_OUTPUT)); in testDefaults() 87 assertTrue(cfg.isEnabled(SerializationFeature.FAIL_ON_EMPTY_BEANS)); in testDefaults() 113 String result = MAPPER.writer().with(SerializationFeature.INDENT_OUTPUT) in testIndentation() 169 final ObjectWriter indentWriter = MAPPER.writer().with(SerializationFeature.INDENT_OUTPUT); in testIndentWithPassedGenerator() 182 m2.enable(SerializationFeature.INDENT_OUTPUT); in testIndentWithPassedGenerator()
|
D | EnumAsMapKeyTest.java | 109 .with(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) in testMapWithEnumKeys() 118 .with(SerializationFeature.WRITE_ENUMS_USING_INDEX) in testMapWithEnumKeys() 147 .with(SerializationFeature.WRITE_ENUM_KEYS_USING_INDEX) in testEnumAsIndexForRootMap() 153 .with(SerializationFeature.WRITE_ENUMS_USING_INDEX) in testEnumAsIndexForRootMap() 169 .with(SerializationFeature.WRITE_ENUM_KEYS_USING_INDEX) in testEnumAsIndexForValueMap() 175 .with(SerializationFeature.WRITE_ENUMS_USING_INDEX) in testEnumAsIndexForValueMap()
|
D | SerializationFeaturesTest.java | 53 m.configure(SerializationFeature.CLOSE_CLOSEABLE, true); in testCloseCloseable() 73 m.configure(SerializationFeature.WRITE_CHAR_ARRAYS_AS_JSON_ARRAYS, true); in testCharArrays() 81 …assertTrue(mapper.getSerializationConfig().isEnabled(SerializationFeature.FLUSH_AFTER_WRITE_VALUE)… in testFlushingAutomatic() 102 mapper.configure(SerializationFeature.FLUSH_AFTER_WRITE_VALUE, false); in testFlushingNotAutomatic() 127 …final ObjectWriter writer = objectWriter().with(SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWR… in testSingleElementCollections()
|
D | TestEnumSerialization.java | 202 m.configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true); in testToStringEnum() 207 m.writer().without(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) in testToStringEnum() 214 m.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); in testToStringEnumWithEnumMap() 224 assertFalse(m.isEnabled(SerializationFeature.WRITE_ENUMS_USING_INDEX)); in testAsIndex() 228 m.enable(SerializationFeature.WRITE_ENUMS_USING_INDEX); in testAsIndex() 261 ObjectWriter w = mapper.writer().without(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); in testEnumMapSerDisableToString() 269 ObjectWriter w = mapper.writer().with(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); in testEnumMapSerEnableToString()
|
D | TestMapSerialization.java | 142 assertFalse(m.isEnabled(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS)); in testOrderByKey() 149 ObjectWriter sortingW = m.writer(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); in testOrderByKey() 156 ObjectWriter sortingW = MAPPER.writer(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); in testOrderByWithNulls() 231 final ObjectWriter w = MAPPER.writer(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); in testConcurrentMaps()
|
D | TestEmptyClass.java | 88 … assertTrue(mapper.getSerializationConfig().isEnabled(SerializationFeature.FAIL_ON_EMPTY_BEANS)); in testEmptyWithFeature() 89 mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); in testEmptyWithFeature()
|
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/cfg/ |
D | SerConfigTest.java | 17 … assertTrue(config.hasSerializationFeatures(SerializationFeature.FAIL_ON_EMPTY_BEANS.getMask())); in testSerConfig() 18 … assertFalse(config.hasSerializationFeatures(SerializationFeature.CLOSE_CLOSEABLE.getMask())); in testSerConfig() 35 assertNotSame(config, config.with(SerializationFeature.INDENT_OUTPUT, in testSerConfig() 36 SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS)); in testSerConfig()
|
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/struct/ |
D | FormatFeatureUnwrapSingleTest.java | 137 MAPPER.writer().with(SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED) in testWithArrayTypes() 142 MAPPER.writer().without(SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED) in testWithArrayTypes() 161 MAPPER.writer().with(SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED) in testWithCollectionTypes() 166 MAPPER.writer().without(SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED) in testWithCollectionTypes() 179 MAPPER.writer().with(SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED) in testUnwrapWithPrimitiveArraysEtc()
|
D | TestForwardReference.java | 10 import com.fasterxml.jackson.databind.SerializationFeature; 19 .enable(SerializationFeature.INDENT_OUTPUT)
|
D | TestUnwrappedWithTypeInfo.java | 11 import com.fasterxml.jackson.databind.SerializationFeature; 81 .disable(SerializationFeature.FAIL_ON_UNWRAPPED_TYPE_IDENTIFIERS) in testUnwrappedWithTypeInfoAndFeatureDisabled()
|
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/util/ |
D | EnumValuesTest.java | 8 import com.fasterxml.jackson.databind.SerializationFeature; 30 .without(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); in testConstructFromName() 43 .with(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); in testConstructWithToString()
|
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/objectid/ |
D | TestObjectIdWithEquals.java | 85 assertFalse(mapper.isEnabled(SerializationFeature.USE_EQUALITY_FOR_OBJECT_ID)); in testSimpleEquals() 86 mapper.enable(SerializationFeature.USE_EQUALITY_FOR_OBJECT_ID); in testSimpleEquals() 127 mapper.enable(SerializationFeature.USE_EQUALITY_FOR_OBJECT_ID); in testEqualObjectIdsExternal()
|
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/convert/ |
D | TestBeanConversions.java | 168 wrappingMapper.enable(SerializationFeature.WRAP_ROOT_VALUE); in testWrapping() 177 wrappingMapper.disable(SerializationFeature.WRAP_ROOT_VALUE); in testWrapping() 182 wrappingMapper.enable(SerializationFeature.WRAP_ROOT_VALUE); in testWrapping() 252 mapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); in testIssue11()
|
/external/jackson-databind/src/main/java/com/fasterxml/jackson/databind/ser/std/ |
D | StdKeySerializers.java | 167 if (provider.isEnabled(SerializationFeature.WRITE_ENUMS_USING_TO_STRING)) { in serialize() 172 if (provider.isEnabled(SerializationFeature.WRITE_ENUM_KEYS_USING_INDEX)) { in serialize() 294 if (serializers.isEnabled(SerializationFeature.WRITE_ENUMS_USING_TO_STRING)) { in serialize() 300 if (serializers.isEnabled(SerializationFeature.WRITE_ENUM_KEYS_USING_INDEX)) { in serialize()
|
D | EnumSerializer.java | 127 if (serializers.isEnabled(SerializationFeature.WRITE_ENUMS_USING_TO_STRING)) { in serialize() 174 serializers.isEnabled(SerializationFeature.WRITE_ENUMS_USING_TO_STRING)) { in acceptJsonFormatVisitor() 199 return serializers.isEnabled(SerializationFeature.WRITE_ENUMS_USING_INDEX); in _serializeAsIndex()
|
/external/jackson-databind/src/main/java/com/fasterxml/jackson/databind/cfg/ |
D | MapperBuilder.java | 73 public boolean isEnabled(SerializationFeature f) { in isEnabled() 115 public B enable(SerializationFeature... features) { in enable() 116 for (SerializationFeature f : features) { in enable() 122 public B disable(SerializationFeature... features) { in disable() 123 for (SerializationFeature f : features) { in disable() 129 public B configure(SerializationFeature feature, boolean state) { in configure()
|
/external/jackson-databind/src/main/java/com/fasterxml/jackson/databind/ser/ |
D | DefaultSerializerProvider.java | 229 if (isEnabled(SerializationFeature.USE_EQUALITY_FOR_OBJECT_ID)) { in _createObjectIdMap() 254 if (!_config.isEnabled(SerializationFeature.FAIL_ON_EMPTY_BEANS)) { in hasSerializerFor() 311 if (_config.isEnabled(SerializationFeature.WRAP_ROOT_VALUE)) { in serializeValue() 348 if (_config.isEnabled(SerializationFeature.WRAP_ROOT_VALUE)) { in serializeValue() 389 if (_config.isEnabled(SerializationFeature.WRAP_ROOT_VALUE)) { in serializeValue() 438 wrap = _config.isEnabled(SerializationFeature.WRAP_ROOT_VALUE); in serializePolymorphic()
|
/external/jackson-databind/src/main/java/com/fasterxml/jackson/databind/ser/impl/ |
D | UnknownSerializer.java | 32 if (provider.isEnabled(SerializationFeature.FAIL_ON_EMPTY_BEANS)) { in serialize() 44 if (provider.isEnabled(SerializationFeature.FAIL_ON_EMPTY_BEANS)) { in serializeWithType()
|
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/ |
D | CyclicTypesDeserTest.java | 99 assertTrue(MAPPER.isEnabled(SerializationFeature.FAIL_ON_SELF_REFERENCES)); in testIgnoredCycle() 108 .without(SerializationFeature.FAIL_ON_SELF_REFERENCES); in testIgnoredCycle()
|