Created
February 25, 2011 23:37
-
-
Save wfaler/844722 to your computer and use it in GitHub Desktop.
Lift JSON issue with multiple constructors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// given the following case class: | |
case class Author(val id: Long, firstName: String, lastName: String, email: Option[String]){ | |
def this() = this(0,"John","Doe",Some("[email protected]")) | |
} | |
// when constructing the case class with: | |
val author = Author | |
// in the above case, Lift-JSON will arbitrarily render "{}" most of the time when doing: | |
compact(render(decompose(author)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment