Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Can't parse case class with type-alias field #70

Open
jdanbrown opened this issue Sep 3, 2012 · 1 comment
Open

Can't parse case class with type-alias field #70

jdanbrown opened this issue Sep 3, 2012 · 1 comment

Comments

@jdanbrown
Copy link
Contributor

import com.codahale.jerkson.Json

object A {

  type Z = Int
  case class Ok(x: Int)
  case class Bad(x: Z)

  def main(args: Array[String]) {
    println(Json.parse[Ok]("""{"x":3}"""))
    println(Json.parse[Bad]("""{"x":3}""")) // ERROR: java.lang.ClassNotFoundException: Z
  }

}
@imikushin
Copy link
Contributor

Hi! It's a known issue, unfortunately. You have to deal with types by their own names.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants