JSONObject jsonObj = new JSONObject("string");
jsonObj.toString();
"employees":[{"firstname":"stack","lastname":"overflow"}, {"firstname":"Happy","lastname":"Coding"}]
我如何可以追加:追加JSON數組的JSONObject
{"firstname":"Gloomy","lastname":"Sunday"}
以上JSON對象
我想
"employees":[{"firstname":"stack","lastname":"overflow"}, {"firstname":"Happy","lastname":"Coding"}, {"firstname":"Gloomy","lastname":"Sunday"}]
upon jsonObj.toString();
你肯定拳頭代碼示例產生於它的結束寫入字符串?數據從哪裏來? –