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._
1313
1414case class JavaMapWrapper (m : java.util.HashMap [String , String ])
1515case class MapWrapper (m : Map [String , String ])
16+ object StringMapTypeReference extends TypeReference [Map [String , String ]]
1617
1718@ RunWith (classOf [JUnitRunner ])
1819class UnsortedMapDeserializerTest extends DeserializerTest {
@@ -25,6 +26,11 @@ class UnsortedMapDeserializerTest extends DeserializerTest {
2526 result should equal (mapScala)
2627 }
2728
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+
2834 it should " deserialize an object into an immutable Map" in {
2935 val typeRef = new TypeReference [immutable.Map [String , String ]] {}
3036 val result = deserialize(mapJson, typeRef)
You can’t perform that action at this time.
0 commit comments