An open API service indexing awesome lists of open source software.

https://github.com/mostlygeek/play2-json-controller

Play Framework 2.0 JSON Only Controller Example
https://github.com/mostlygeek/play2-json-controller

Last synced: 3 months ago
JSON representation

Play Framework 2.0 JSON Only Controller Example

Awesome Lists containing this project

README

        

# Play 2.0 Demo JSON Only Controller

The Play framework has facilities for making it easy to work with JSON and
creating custom controllers.

This mini-project demonstrates

* creating of a controller that accepts ajax requests with a JSON payload
* working with the json body as the default JsValue
* working with the json body, by converting the JsValue to a Case class

## Try it out

* [DEMO](http://play2-json-controller.herokuapp.com/)

## References

* [Working with JSON in Play](http://www.playframework.org/documentation/2.0.2/ScalaJson/)