You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
Jerkson can't deserialize into parameterized types. For example (based on ExampleCaseClasses.scala):
case class CaseClassWithList[T](id: Long, list: List[T])
parse[CaseClassWithList[CaseClass]]("""{"id":1,"list":[{"id":1,"name":"Coda"}]}""")
will throw a java.lang.ClassNotFoundException: T. Unlike issue #9, I'd like to be able to hint in the scala code (not in the JSON) that the parameterized type should be a CaseClass. I think something like parse[CaseClassWithList[CaseClass]](arg, List[Class]) where the list of classes would specify the parameterized types that ClassFileParser can't determine from the bytecode.
Thoughts? Is there a better way to do this? I made a commit in my fork of jerkson which has the full (failing) test case if that helps.
Jerkson can't deserialize into parameterized types. For example (based on ExampleCaseClasses.scala):
will throw a
java.lang.ClassNotFoundException: T. Unlike issue #9, I'd like to be able to hint in the scala code (not in the JSON) that the parameterized type should be aCaseClass. I think something likeparse[CaseClassWithList[CaseClass]](arg, List[Class])where the list of classes would specify the parameterized types that ClassFileParser can't determine from the bytecode.Thoughts? Is there a better way to do this? I made a commit in my fork of jerkson which has the full (failing) test case if that helps.