I'm trying to create a JSONObject in my Android project. It seems to work, but it only seems to remember the last thing I put into it. This code:
JSONObject json = new JSONObject();
try {
json.put("text", "thi sis the message");
json.put("customer_uuid", customer_uuid);
Log.wtf(json.toString(), "asassa");
} catch (JSONException e) {
Log.wtf("WTF", e);
}
Prints out {"customer_uuid": "123"}
. But when I erase the line in which the customer_uuid is put in, it only prints out {"text", "thi sis the message"}
.
Why does it only remember the last thing I put in? And more importantly, how do I make it store both the things? All tips are welcome!