在我的spring(mvc)web應用程序中,我在我的scala代碼中使用org.codehaus.jackson.map.ObjectMapper
將我的json映射爲使用case類的scala對象。我的Json字符串是一個json對象數組。所以我用:將json解析爲scala case類時出錯
val user = mapper.readValue(myJson, classOf[List[MyClass]])
此行拋出一個錯誤:
Exception in thread "main" org.codehaus.jackson.map.JsonMappingException: Can not construct instance of scala.collection.immutable.List, problem: abstract types can only be instantiated with additional type inform
我使用它的權利或有任何其他方式?