Created
June 23, 2014 21:04
-
-
Save anonymous/43c3e0710952ce1370a3 to your computer and use it in GitHub Desktop.
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
case class Foo(a: String, b: Int) | |
object Foo { | |
def apply(a: String, b: String) = new Foo(a, b.toInt) | |
} | |
val format = jsonFormat6(new { | |
def apply(a: String, b: Int): Foo = Foo(a, b) | |
def unapply(f: Foo) = Foo.unapply(f) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment