Skip to content

Instantly share code, notes, and snippets.

@wfaler
Created February 25, 2011 23:37
Show Gist options
  • Save wfaler/844722 to your computer and use it in GitHub Desktop.
Save wfaler/844722 to your computer and use it in GitHub Desktop.
Lift JSON issue with multiple constructors
// 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