0
JSONObjectにデータを挿入/追加する方法 次のデータセットを含むJSONObjectを作成しようとしています。データをJSONObjectをある形式で挿入する
{
"feature": "testFeature",
"scenario": [{
"name": "Add numbers",
"tag": "@test"
}, {
"name": "Delete numbers",
"tag": "@test123"
}]
}
私はどのように進行しているのかわかりません。ヘルプをしてください。
Collection<JSONObject> items = new ArrayList<JSONObject>();
JSONArray array1 = new JSONArray();
JSONObject item1 = new JSONObject();
item1.put("scenario", array1);