Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialization of a simple case class with type synonyms hangs indefinitely #281

Open
raimohanska opened this issue Aug 10, 2015 · 1 comment
Labels

Comments

@raimohanska
Copy link
Contributor

At least for me, this code never completes:

object FailingSerialization extends App {
  implicit val jsonFormats = new DefaultFormats {}
  println("Trying to serialize...")
  println(org.json4s.jackson.Serialization.write(Thing(Some(1))))
}

object Thing {
  type Id = Int
}
case class Thing(id: Option[Thing.Id])

If I remove the type Id = Int synonym and use Int directly in the Thing class, it works just fine. Also, if I remove the Option wrapper from the id field, it works.

I'm using json4s-jackson_2.11:3.3.0.RC3.

@dsbos
Copy link
Contributor

dsbos commented Aug 13, 2016

#397 seems related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants