Creating Json is easy with play framework / scala. here is an example about it ,
import play.api.libs.json.Json
val json: JsValue = Json.parse("""
{
"user": {
"name" : "toto",
"age" : 25,
"email" : "[email protected]",
"isAlive" : true,
"friend" : {
"name" : "tata",
"age" : 20,
"email" : "[email protected]"
}
}
}
""")
For more information and source : http://www.playframework.com/documentation/2.1.1/ScalaJson