File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/test/scala/com/fasterxml/jackson/module/scala/deser Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import scala.collection._
13
13
14
14
case class JavaMapWrapper (m : java.util.HashMap [String , String ])
15
15
case class MapWrapper (m : Map [String , String ])
16
+ object StringMapTypeReference extends TypeReference [Map [String , String ]]
16
17
17
18
@ RunWith (classOf [JUnitRunner ])
18
19
class UnsortedMapDeserializerTest extends DeserializerTest {
@@ -25,6 +26,11 @@ class UnsortedMapDeserializerTest extends DeserializerTest {
25
26
result should equal (mapScala)
26
27
}
27
28
29
+ it should " deserialize an object into a Map (TypeReference not declared as anonymous class)" in {
30
+ val result = deserialize(mapJson, StringMapTypeReference )
31
+ result should equal (mapScala)
32
+ }
33
+
28
34
it should " deserialize an object into an immutable Map" in {
29
35
val typeRef = new TypeReference [immutable.Map [String , String ]] {}
30
36
val result = deserialize(mapJson, typeRef)
You can’t perform that action at this time.
0 commit comments