Created
May 3, 2015 05:15
-
-
Save JosephMoniz/608a26bcb9776f17cd34 to your computer and use it in GitHub Desktop.
An example of returning a JSON response
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
final case class JsonController() extends Controller { | |
def action(implicit request: HttpRequest): Box[Throwable, HttpResponse] = { | |
Ok(JsObject( | |
"status" -> "ok", | |
"message" -> JsObject( | |
"email" -> "[email protected]", | |
"admin" -> false | |
) | |
)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment