Im using scala.util.parsing.json and I want to create a json with the following format:
{ users : {
username: foo,
password: bar}
}
I tried using this code:
val json = JSONObject(
Map(
"users" -> Map(
"username" -> "foo",
"password" -> "bar")))
but this method create this json:
{"user" : Map(username -> foo, password -> bar)}
thanks for the help!
seems to do it.