Skip to content

Instantly share code, notes, and snippets.

@JosephMoniz
Created May 3, 2015 05:15
Show Gist options
  • Save JosephMoniz/608a26bcb9776f17cd34 to your computer and use it in GitHub Desktop.
Save JosephMoniz/608a26bcb9776f17cd34 to your computer and use it in GitHub Desktop.
An example of returning a JSON response
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