Home
last modified time | relevance | path

Searched refs:MAPPER (Results 1 – 25 of 285) sorted by relevance

12345678910>>...12

/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/jdk/
DDateDeserializationTZTest.java58 private ObjectMapper MAPPER; field in DateDeserializationTZTest
69 MAPPER = m; in setUp()
86 … verify( MAPPER, "2000-01-02T03:04:05.678+01:00", judate(2000, 1, 2, 3, 4, 5, 678, "GMT+1")); in testDateUtilISO8601_Timezone()
88 … verify( MAPPER, "2000-01-02T03:04:05.678+0100", judate(2000, 1, 2, 3, 4, 5, 678, "GMT+1")); in testDateUtilISO8601_Timezone()
90 … verify( MAPPER, "2000-01-02T03:04:05.678+01", judate(2000, 1, 2, 3, 4, 5, 678, "GMT+1")); in testDateUtilISO8601_Timezone()
93 verify( MAPPER, "2000-01-02T03:04:05.678Z", judate(2000, 1, 2, 3, 4, 5, 678, "UTC")); in testDateUtilISO8601_Timezone()
103 failure( MAPPER, "2000-01-02T03:04:05.678+"); in testDateUtilISO8601_Timezone()
104 failure( MAPPER, "2000-01-02T03:04:05.678+1"); in testDateUtilISO8601_Timezone()
106 failure( MAPPER, "2000-01-02T03:04:05.678+001"); in testDateUtilISO8601_Timezone()
107 failure( MAPPER, "2000-01-02T03:04:05.678+00:"); in testDateUtilISO8601_Timezone()
[all …]
DJDKScalarsTest.java124 private final ObjectMapper MAPPER = newJsonMapper(); field in JDKScalarsTest
139 BooleanBean result = MAPPER.readValue("{\"v\":true}", BooleanBean.class); in testBooleanPrimitive()
141 result = MAPPER.readValue("{\"v\":null}", BooleanBean.class); in testBooleanPrimitive()
144 result = MAPPER.readValue("{\"v\":1}", BooleanBean.class); in testBooleanPrimitive()
149 boolean[] array = MAPPER.readValue("[ null, false ]", boolean[].class); in testBooleanPrimitive()
162 Boolean result = MAPPER.readValue("true", Boolean.class); in testBooleanWrapper()
164 result = MAPPER.readValue("false", Boolean.class); in testBooleanWrapper()
168 result = MAPPER.readValue("0", Boolean.class); in testBooleanWrapper()
170 result = MAPPER.readValue("1", Boolean.class); in testBooleanWrapper()
178 …BooleanWrapper b = MAPPER.readValue("{\"primitive\" : "+value+", \"wrapper\":"+value+", \"ctor\":"… in testLongToBoolean()
[all …]
DJDKNumberDeserTest.java101 final ObjectMapper MAPPER = new ObjectMapper(); field in JDKNumberDeserTest
105 Float result = MAPPER.readValue(" \"NaN\"", Float.class); in testNaN()
108 Double d = MAPPER.readValue(" \"NaN\"", Double.class); in testNaN()
111 Number num = MAPPER.readValue(" \"NaN\"", Number.class); in testNaN()
117 Double result = MAPPER.readValue(" \""+Double.POSITIVE_INFINITY+"\"", Double.class); in testDoubleInf()
120 result = MAPPER.readValue(" \""+Double.NEGATIVE_INFINITY+"\"", Double.class); in testDoubleInf()
128 assertNull(MAPPER.readValue(quote(""), Byte.class)); in testEmptyAsNumber()
129 assertNull(MAPPER.readValue(quote(""), Short.class)); in testEmptyAsNumber()
130 assertNull(MAPPER.readValue(quote(""), Character.class)); in testEmptyAsNumber()
131 assertNull(MAPPER.readValue(quote(""), Integer.class)); in testEmptyAsNumber()
[all …]
DJDKStringLikeTypesTest.java67 private final ObjectMapper MAPPER = objectMapper(); field in JDKStringLikeTypesTest
73 String exp = MAPPER.writeValueAsString(INPUT); in testByteBuffer()
74 ByteBuffer result = MAPPER.readValue(exp, ByteBuffer.class); in testByteBuffer()
86 assertSame(UTF8, MAPPER.readValue(quote("UTF-8"), Charset.class)); in testCharset()
108 String json = MAPPER.writeValueAsString(new ParamClassBean("Foobar")); in testClassWithParams()
110 ParamClassBean result = MAPPER.readValue(json, ParamClassBean.class); in testClassWithParams()
128 String json = MAPPER.writeValueAsString(abs); in testFile()
129 File result = MAPPER.readValue(json, File.class); in testFile()
135 assertEquals(new Locale("en"), MAPPER.readValue(quote("en"), Locale.class)); in testLocale()
136 assertEquals(new Locale("es", "ES"), MAPPER.readValue(quote("es_ES"), Locale.class)); in testLocale()
[all …]
DEnumDeserializationTest.java224 protected final ObjectMapper MAPPER = new ObjectMapper(); field in EnumDeserializationTest
231 JsonParser jp = MAPPER.createParser(JSON); in testSimple()
233 assertEquals(TestEnum.OK, MAPPER.readValue(jp, TestEnum.class)); in testSimple()
234 assertEquals(TestEnum.RULES, MAPPER.readValue(jp, TestEnum.class)); in testSimple()
237 assertNull(MAPPER.readValue(jp, TestEnum.class)); in testSimple()
243 assertEquals(TestEnum.JACKSON, MAPPER.readValue(" 0 ", TestEnum.class)); in testSimple()
247 /*Object result =*/ MAPPER.readValue("\"NO-SUCH-VALUE\"", TestEnum.class); in testSimple()
261 String json = MAPPER.writeValueAsString(TimeUnit.SECONDS); in testComplexEnum()
263 TimeUnit result = MAPPER.readValue(json, TimeUnit.class); in testComplexEnum()
272 AnnotatedTestEnum e = MAPPER.readValue("\"JACKSON\"", AnnotatedTestEnum.class); in testAnnotated()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/node/
DEmptyContentAsTreeTest.java16 private final ObjectMapper MAPPER = objectMapper(); field in EmptyContentAsTreeTest
28 try (JsonParser p = MAPPER.createParser(EMPTY0)) { in testNullFromEOFWithParserAndMapper()
29 _assertNullTree(MAPPER.readTree(p)); in testNullFromEOFWithParserAndMapper()
31 try (JsonParser p = MAPPER.createParser(EMPTY1)) { in testNullFromEOFWithParserAndMapper()
32 _assertNullTree(MAPPER.readTree(p)); in testNullFromEOFWithParserAndMapper()
34 try (JsonParser p = MAPPER.createParser(new StringReader(EMPTY0))) { in testNullFromEOFWithParserAndMapper()
35 _assertNullTree(MAPPER.readTree(p)); in testNullFromEOFWithParserAndMapper()
37 try (JsonParser p = MAPPER.createParser(new StringReader(EMPTY1))) { in testNullFromEOFWithParserAndMapper()
38 _assertNullTree(MAPPER.readTree(p)); in testNullFromEOFWithParserAndMapper()
41 try (JsonParser p = MAPPER.createParser(EMPTY0_BYTES)) { in testNullFromEOFWithParserAndMapper()
[all …]
DObjectNodeTest.java72 private final ObjectMapper MAPPER = sharedMapper(); field in ObjectNodeTest
77 JsonNode root = MAPPER.readTree(JSON); in testSimpleObject()
124 Data w = MAPPER.readValue("{}", Data.class); in testEmptyNodeAsValue()
244 ObjectNode src = MAPPER.createObjectNode(); in testNullChecking2()
245 ObjectNode dest = MAPPER.createObjectNode(); in testNullChecking2()
252 ObjectNode ob = MAPPER.createObjectNode(); in testRemove()
264 ObjectNode ob = MAPPER.createObjectNode(); in testRetain()
278 ObjectNode root = MAPPER.createObjectNode(); in testValidWith()
279 assertEquals("{}", MAPPER.writeValueAsString(root)); in testValidWith()
282 assertEquals("{\"prop\":{}}", MAPPER.writeValueAsString(root)); in testValidWith()
[all …]
DToStringForNodesTest.java7 private final ObjectMapper MAPPER = objectMapper(); field in ToStringForNodesTest
11 … _verifyToStrings(MAPPER.readTree("{ \"key\" : 1, \"b\" : \"x\", \"array\" : [ 1, false ] }")); in testObjectNode()
12 final ObjectNode n = MAPPER.createObjectNode().put("msg", "hello world"); in testObjectNode()
13 assertEquals(MAPPER.writeValueAsString(n), n.toString()); in testObjectNode()
14 final String expPretty = MAPPER.writer().withDefaultPrettyPrinter() in testObjectNode()
21 _verifyToStrings(MAPPER.readTree("[ 1, true, null, [ \"abc\",3], { } ]")); in testArrayNode()
22 final ArrayNode n = MAPPER.createArrayNode().add(0.25).add(true); in testArrayNode()
29 _verifyToStrings(MAPPER.getNodeFactory().binaryNode(new byte[] { 1, 2, 3, 4, 6 })); in testBinaryNode()
34 assertEquals(MAPPER.writeValueAsString(node), node.toString()); in _verifyToStrings()
36 assertEquals(MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(node), in _verifyToStrings()
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/ser/jdk/
DJDKTypeSerializationTest.java23 private final ObjectMapper MAPPER = objectMapper(); field in JDKTypeSerializationTest
41 String str = MAPPER.writeValueAsString(map); in testBigDecimal()
61 String str = MAPPER.writeValueAsString(f); in testFile()
73 Map<String,Object> result = writeAndMap(MAPPER, input); in testRegexps()
80 assertEquals(quote("USD"), MAPPER.writeValueAsString(usd)); in testCurrency()
85 assertEquals(quote("en"), MAPPER.writeValueAsString(new Locale("en"))); in testLocale()
86 assertEquals(quote("es_ES"), MAPPER.writeValueAsString(new Locale("es", "ES"))); in testLocale()
87 … assertEquals(quote("fi_FI_savo"), MAPPER.writeValueAsString(new Locale("FI", "fi", "savo"))); in testLocale()
89 assertEquals(quote("en_US"), MAPPER.writeValueAsString(Locale.US)); in testLocale()
92 assertEquals(quote(""), MAPPER.writeValueAsString(Locale.ROOT)); in testLocale()
[all …]
DNumberSerTest.java20 private final ObjectMapper MAPPER = sharedMapper(); field in NumberSerTest
94 assertEquals(expected, MAPPER.writeValueAsString(Double.valueOf(d))); in testDouble()
109 assertEquals(expected, MAPPER.writeValueAsString(value)); in testBigInteger()
115 assertEquals(aposToQuotes("{'value':'3'}"), MAPPER.writeValueAsString(new IntAsString())); in testNumbersAsString()
116 assertEquals(aposToQuotes("{'value':'4'}"), MAPPER.writeValueAsString(new LongAsString())); in testNumbersAsString()
117 … assertEquals(aposToQuotes("{'value':'-0.5'}"), MAPPER.writeValueAsString(new DoubleAsString())); in testNumbersAsString()
118 …assertEquals(aposToQuotes("{'value':'0.25'}"), MAPPER.writeValueAsString(new BigDecimalAsString())… in testNumbersAsString()
119 …assertEquals(aposToQuotes("{'value':'123456'}"), MAPPER.writeValueAsString(new BigIntegerAsString(… in testNumbersAsString()
151 …assertEquals(aposToQuotes("{'value':1}"), MAPPER.writeValueAsString(new NumberWrapper(Byte.valueOf… in testNumberType()
152 …assertEquals(aposToQuotes("{'value':2}"), MAPPER.writeValueAsString(new NumberWrapper(Short.valueO… in testNumberType()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/convert/
DScalarConversionTest.java7 private final ObjectMapper MAPPER = new ObjectMapper(); field in ScalarConversionTest
12 assertEquals(Byte.valueOf((byte) 0), MAPPER.convertValue(null, Byte.TYPE)); in testConvertValueNullPrimitive()
13 assertEquals(Short.valueOf((short) 0), MAPPER.convertValue(null, Short.TYPE)); in testConvertValueNullPrimitive()
14 assertEquals(Integer.valueOf(0), MAPPER.convertValue(null, Integer.TYPE)); in testConvertValueNullPrimitive()
15 assertEquals(Long.valueOf(0L), MAPPER.convertValue(null, Long.TYPE)); in testConvertValueNullPrimitive()
16 assertEquals(Float.valueOf(0f), MAPPER.convertValue(null, Float.TYPE)); in testConvertValueNullPrimitive()
17 assertEquals(Double.valueOf(0d), MAPPER.convertValue(null, Double.TYPE)); in testConvertValueNullPrimitive()
18 assertEquals(Character.valueOf('\0'), MAPPER.convertValue(null, Character.TYPE)); in testConvertValueNullPrimitive()
19 assertEquals(Boolean.FALSE, MAPPER.convertValue(null, Boolean.TYPE)); in testConvertValueNullPrimitive()
25 assertNull(MAPPER.convertValue(null, Byte.class)); in testConvertValueNullBoxed()
[all …]
DTestStringConversions.java33 private final ObjectMapper MAPPER = new ObjectMapper(); field in TestStringConversions
37 assertEquals(Boolean.TRUE, MAPPER.convertValue("true", Boolean.class)); in testSimple()
38 assertEquals(Integer.valueOf(-3), MAPPER.convertValue("-3", Integer.class)); in testSimple()
39 assertEquals(Long.valueOf(77), MAPPER.convertValue("77", Long.class)); in testSimple()
47 assertArrayEquals(ints, MAPPER.convertValue(Ints, int[].class)); in testSimple()
54 MAPPER.convertValue("1 2 3 4 -1 0".split("\\s+"), int[].class)); in testStringsToInts()
60 String encoded = MAPPER.convertValue(input, String.class); in testBytesToBase64AndBack()
68 byte[] result = MAPPER.convertValue(encoded, byte[].class); in testBytesToBase64AndBack()
76 char[] expEncoded = MAPPER.convertValue(input, String.class).toCharArray(); in testBytestoCharArray()
78 char[] actEncoded = MAPPER.convertValue(input, char[].class); in testBytestoCharArray()
[all …]
DTestBeanConversions.java121 private final ObjectMapper MAPPER = new ObjectMapper(); field in TestBeanConversions
127 PointZ point = MAPPER.convertValue(input, PointZ.class); in testBeanConvert()
141 MAPPER.readValue("{\"unknownProp\":true}", BooleanBean.class); in testErrorReporting()
148 MAPPER.readValue("{\"boolProp\":\"foobar\"}", BooleanBean.class); in testErrorReporting()
158 ObjectWrapper b2 = MAPPER.convertValue(b, ObjectWrapper.class); in testIssue458()
159 ObjectWrapper a2 = MAPPER.convertValue(b2.getData(), ObjectWrapper.class); in testIssue458()
191 String result = MAPPER.convertValue(seq, String.class); in testConvertUsingCast()
199 ObjectNode src = (ObjectNode) MAPPER.readTree("{}"); in testNodeConvert()
201 ObjectNode result = MAPPER.treeToValue(node, ObjectNode.class); in testNodeConvert()
222 CharSequence seq = MAPPER.convertValue(SB, CharSequence.class); in testIssue11()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/ser/
DTestSimpleTypes.java16 private final ObjectMapper MAPPER = new ObjectMapper(); field in TestSimpleTypes
20 assertEquals("true", serializeAsString(MAPPER, Boolean.TRUE)); in testBoolean()
21 assertEquals("false", serializeAsString(MAPPER, Boolean.FALSE)); in testBoolean()
26 assertEquals("[true,false]", serializeAsString(MAPPER, new boolean[] { true, false} )); in testBooleanArray()
27 …assertEquals("[true,false]", serializeAsString(MAPPER, new Boolean[] { Boolean.TRUE, Boolean.FALSE… in testBooleanArray()
38 String str1 = serializeAsString(MAPPER, data); in testByteArray()
39 String str2 = serializeAsString(MAPPER, data2); in testByteArray()
40 assertArrayEquals(data, MAPPER.readValue(str1, byte[].class)); in testByteArray()
41 assertArrayEquals(data2, MAPPER.readValue(str2, Byte[].class)); in testByteArray()
50 …4eXoxMjM0NTY3ODkwYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY3ODkwWA=="), MAPPER.writeValueAsString… in testBase64Variants()
[all …]
DJsonValueTest.java202 private final ObjectMapper MAPPER = new ObjectMapper(); field in JsonValueTest
206 assertEquals("\"abc\"", MAPPER.writeValueAsString(new ValueClass<String>("abc"))); in testSimpleMethodJsonValue()
207 assertEquals("null", MAPPER.writeValueAsString(new ValueClass<String>(null))); in testSimpleMethodJsonValue()
212 assertEquals("\"abc\"", MAPPER.writeValueAsString(new FieldValueClass<String>("abc"))); in testSimpleFieldJsonValue()
213 assertEquals("null", MAPPER.writeValueAsString(new FieldValueClass<String>(null))); in testSimpleFieldJsonValue()
218 … String result = serializeAsString(MAPPER, new ToStringValueClass<Integer>(Integer.valueOf(123))); in testJsonValueWithUseSerializer()
227 String result = serializeAsString(MAPPER, new ToStringValueClass2("xyz")); in testMixedJsonValue()
234 MAPPER.writeValueAsString(new DisabledJsonValue())); in testDisabling()
240 assertEquals("{\"a\":\"a\",\"b\":\"b\"}", MAPPER.writeValueAsString(new ValueWrapper())); in testValueWithStaticType()
251 assertEquals("{\"a\":\"1\"}", MAPPER.writeValueAsString(new MapBean())); in testMapWithJsonValue()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/ser/filter/
DJsonIncludeArrayTest.java74 final private ObjectMapper MAPPER = new ObjectMapper(); field in JsonIncludeArrayTest
78 assertEquals("{}", MAPPER.writeValueAsString(new NonEmptyByteArray())); in testByteArray()
83 assertEquals("{}", MAPPER.writeValueAsString(new NonEmptyShortArray())); in testShortArray()
84 … assertEquals("{\"value\":[1]}", MAPPER.writeValueAsString(new NonEmptyShortArray((short) 1))); in testShortArray()
89 assertEquals("{}", MAPPER.writeValueAsString(new NonEmptyCharArray())); in testCharArray()
91 … assertEquals("{\"value\":\"ab\"}", MAPPER.writeValueAsString(new NonEmptyCharArray('a', 'b'))); in testCharArray()
93 assertEquals("{\"value\":[\"a\",\"b\"]}", MAPPER in testCharArray()
100 assertEquals("{}", MAPPER.writeValueAsString(new NonEmptyIntArray())); in testIntArray()
101 assertEquals("{\"value\":[2]}", MAPPER.writeValueAsString(new NonEmptyIntArray(2))); in testIntArray()
106 assertEquals("{}", MAPPER.writeValueAsString(new NonEmptyLongArray())); in testLongArray()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/struct/
DFormatFeatureUnwrapSingleTest.java127 private final ObjectMapper MAPPER = new ObjectMapper(); field in FormatFeatureUnwrapSingleTest
133 MAPPER.writeValueAsString(new WrapWriteWithArrays())); in testWithArrayTypes()
137 MAPPER.writer().with(SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED) in testWithArrayTypes()
142 MAPPER.writer().without(SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED) in testWithArrayTypes()
157 MAPPER.writeValueAsString(new WrapWriteWithCollections())); in testWithCollectionTypes()
161 MAPPER.writer().with(SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED) in testWithCollectionTypes()
166 MAPPER.writer().without(SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED) in testWithCollectionTypes()
171 assertEquals("{\"v\":7}", MAPPER.writeValueAsString(new UnwrapShortArray())); in testUnwrapWithPrimitiveArraysEtc()
172 assertEquals("{\"v\":3}", MAPPER.writeValueAsString(new UnwrapIntArray())); in testUnwrapWithPrimitiveArraysEtc()
173 assertEquals("{\"v\":1}", MAPPER.writeValueAsString(new UnwrapLongArray())); in testUnwrapWithPrimitiveArraysEtc()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/
DObjectReaderTest.java23 final JsonMapper MAPPER = JsonMapper.builder().build(); field in ObjectReaderTest
38 JsonParser p = MAPPER.createParser(JSON); in testSimpleViaParser()
39 Object ob = MAPPER.readerFor(Object.class) in testSimpleViaParser()
49 Object ob = MAPPER.readerFor(Object.class) in testSimpleAltSources()
53 ob = MAPPER.readerFor(Object.class) in testSimpleAltSources()
60 MAPPER.readerFor(Object.class) in testSimpleAltSources()
71 Object value = MAPPER.readerForArrayOf(ABC.class) in testReaderForArrayOf()
83 Object value = MAPPER.readerForListOf(ABC.class) in testReaderForListOf()
92 Object value = MAPPER.readerForMapOf(ABC.class) in testReaderForMapOf()
101 ObjectReader r = MAPPER.reader().with(nodes); in testNodeHandling()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/views/
DTestViewSerialization.java78 private final ObjectMapper MAPPER = objectMapper(); field in TestViewSerialization
86 Map<String,Object> map = writeAndMap(MAPPER, bean); in testSimple()
91 MAPPER.writerWithView(ViewA.class).writeValue(sw, bean); in testSimple()
92 map = MAPPER.readValue(sw.toString(), Map.class); in testSimple()
98 MAPPER.writerWithView(ViewAA.class).writeValue(sw, bean); in testSimple()
99 map = MAPPER.readValue(sw.toString(), Map.class); in testSimple()
105 String json = MAPPER.writerWithView(ViewB.class).writeValueAsString(bean); in testSimple()
106 map = MAPPER.readValue(json, Map.class); in testSimple()
112 json = MAPPER.writerWithView(ViewBB.class).writeValueAsString(bean); in testSimple()
113 map = MAPPER.readValue(json, Map.class); in testSimple()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/jsontype/
DExistingPropertyTest.java231 private final ObjectMapper MAPPER = new ObjectMapper(); field in ExistingPropertyTest
238 Map<String,Object> result = writeAndMap(MAPPER, pinguo); in testExistingPropertySerializationFruits()
244 result = writeAndMap(MAPPER, mandarin); in testExistingPropertySerializationFruits()
250 String pinguoSerialized = MAPPER.writeValueAsString(pinguo); in testExistingPropertySerializationFruits()
253 String mandarinSerialized = MAPPER.writeValueAsString(mandarin); in testExistingPropertySerializationFruits()
256 String fruitWrapperSerialized = MAPPER.writeValueAsString(pinguoWrapper); in testExistingPropertySerializationFruits()
259 String fruitListSerialized = MAPPER.writeValueAsString(fruitList); in testExistingPropertySerializationFruits()
268 Fruit pinguoDeserialized = MAPPER.readValue(pinguoJson, Fruit.class); in testSimpleClassAsExistingPropertyDeserializationFruits()
275 … FruitWrapper pinguoWrapperDeserialized = MAPPER.readValue(pinguoWrapperJson, FruitWrapper.class); in testSimpleClassAsExistingPropertyDeserializationFruits()
283 Fruit[] fruits = MAPPER.readValue(fruitListJson, Fruit[].class); in testSimpleClassAsExistingPropertyDeserializationFruits()
[all …]
DTestVisibleTypeId.java160 private final ObjectMapper MAPPER = new ObjectMapper(); field in TestVisibleTypeId
164 String json = MAPPER.writeValueAsString(new PropertyBean()); in testVisibleWithProperty()
168 PropertyBean result = MAPPER.readValue(json, PropertyBean.class); in testVisibleWithProperty()
172 result = MAPPER.readValue("{\"a\":7, \"type\":\"BaseType\"}", PropertyBean.class); in testVisibleWithProperty()
179 String json = MAPPER.writeValueAsString(new WrapperArrayBean()); in testVisibleWithWrapperArray()
183 WrapperArrayBean result = MAPPER.readValue(json, WrapperArrayBean.class); in testVisibleWithWrapperArray()
190 String json = MAPPER.writeValueAsString(new WrapperObjectBean()); in testVisibleWithWrapperObject()
193 WrapperObjectBean result = MAPPER.readValue(json, WrapperObjectBean.class); in testVisibleWithWrapperObject()
200 MAPPER.writeValueAsString(new TypeIdFromFieldProperty())); in testTypeIdFromProperty()
206 MAPPER.writeValueAsString(new TypeIdFromFieldArray())); in testTypeIdFromArray()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/jsontype/ext/
DTestSubtypesExternalPropertyMissingProperty.java90 private final ObjectMapper MAPPER = newJsonMapper(); field in TestSubtypesExternalPropertyMissingProperty
123 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()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/introspect/
DPOJOPropertiesCollectorTest.java240 private final ObjectMapper MAPPER = objectMapper(); field in POJOPropertiesCollectorTest
244 POJOPropertiesCollector coll = collector(MAPPER, in testSimple()
258 POJOPropertiesCollector coll = collector(MAPPER, in testSimpleFieldVisibility()
271 POJOPropertiesCollector coll = collector(MAPPER, in testSimpleGetterVisibility()
286 POJOPropertiesCollector coll = collector(MAPPER, in testEmpty()
297 POJOPropertiesCollector coll = collector(MAPPER, in testPartialIgnore()
310 POJOPropertiesCollector coll = collector(MAPPER, in testSimpleRenamed()
323 POJOPropertiesCollector coll = collector(MAPPER, in testSimpleRenamed2()
336 POJOPropertiesCollector coll = collector(MAPPER, in testMergeWithRename()
349 POJOPropertiesCollector coll = collector(MAPPER, in testSimpleIgnoreAndRename()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/
DTestJacksonTypes.java16 private final ObjectMapper MAPPER = sharedMapper(); field in TestJacksonTypes
23 String ser = MAPPER.writeValueAsString(loc); in testJsonLocation()
24 JsonLocation result = MAPPER.readValue(ser, JsonLocation.class); in testJsonLocation()
50 String json = MAPPER.writeValueAsString(tf.constructType(String.class)); in testJavaType()
53 JavaType t = MAPPER.readValue(json, JavaType.class); in testJavaType()
65 TokenBuffer result = MAPPER.readValue(SAMPLE_DOC_JSON_SPEC, TokenBuffer.class); in testTokenBufferWithSample()
78 TokenBuffer buf = MAPPER.readValue(jp, TokenBuffer.class); in testTokenBufferWithSequence()
87 buf = MAPPER.readValue(jp, TokenBuffer.class); in testTokenBufferWithSequence()
96 buf = MAPPER.readValue(jp, TokenBuffer.class); in testTokenBufferWithSequence()
97 String str = MAPPER.readValue(buf.asParser(), String.class); in testTokenBufferWithSequence()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/creators/
DTestCreators.java302 private final ObjectMapper MAPPER = new ObjectMapper(); field in TestCreators
306 ConstructorBean bean = MAPPER.readValue("{ \"x\" : 42 }", ConstructorBean.class); in testSimpleConstructor()
313 NoArgFactoryBean value = MAPPER.readValue("{\"y\":13}", NoArgFactoryBean.class); in testNoArgsFactory()
321 DoubleConstructorBean bean = MAPPER.readValue(exp.toString(), DoubleConstructorBean.class); in testSimpleDoubleConstructor()
327 BooleanConstructorBean bean = MAPPER.readValue(" true ", BooleanConstructorBean.class); in testSimpleBooleanConstructor()
330 BooleanConstructorBean2 bean2 = MAPPER.readValue(" true ", BooleanConstructorBean2.class); in testSimpleBooleanConstructor()
336 final BigIntegerWrapper result = MAPPER.readValue("17", BigIntegerWrapper.class); in testSimpleBigIntegerConstructor()
342 final BigDecimalWrapper result = MAPPER.readValue("42.5", BigDecimalWrapper.class); in testSimpleBigDecimalConstructor()
348 FactoryBean bean = MAPPER.readValue("{ \"f\" : 0.25 }", FactoryBean.class); in testSimpleFactory()
355 LongFactoryBean bean = MAPPER.readValue(String.valueOf(VALUE), LongFactoryBean.class); in testLongFactory()
[all …]

12345678910>>...12