For example, I have this Map value in Scala:
val m = Map(
\"name\" -> \"john doe\",
\"age\" -> 18,
\"hasChild\" -> true,
\"childs\" -
If you're working with a well-defined data model, why not define case classes and use Play JSON macros to handle conversion? i.e.
case class Person(name: String, age: Int, hasChild: Boolean, childs: List[Person])
implicit val fmt = Json.format[Person]
val person = Person(...)
val jsonStr = Json.toJson(person)