I am using the Play framework with Scala, and I need to give an input which has to look like so: :
{
id: "node37",
name: "3.7",
data: {},
children:[]
},
How can I obtain that format with json? Here is the example from the Play framework's website:
val JsonObject= Json.obj(
"users" -> Json.arr(
Json.obj(
"id" -> "bob",
"name" -> 31,
"data" -> JsNull,
"children" ->JsNull
),
Json.obj(
"id" -> "kiki",
"name" -> 25,
"data" -> JsNull,
"children" ->JsNull
)
)
)