I need to build a JSONObject that looks like this:
{
"login": {
"email": "blah@blah.com",
"password": "password"
}
}
I understand that I'm supposed to use jsonObject.put("key", "value)
, but how to I get the parent "login" node with nested keys / values?
Will I have an easier time building objects like this with Gson? Some of them are pretty complex. Thanks!