Created
September 6, 2013 23:02
-
-
Save francisdb/6471158 to your computer and use it in GitHub Desktop.
Anorm + play json
This file contains 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
implicit val pkWrites = new Writes[Pk[Long]] { | |
def writes(pk: Pk[Long]): JsValue = { | |
pk.toOption match { | |
case Some(value) => JsNumber(value) | |
case None => JsNull // TODO check if correct | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment