将新对象添加到现有json文件Android Java

将新对象添加到现有json文件Android Java,java,android,json,android-studio,jsonobject,Java,Android,Json,Android Studio,Jsonobject,我的json文件:DB.json { "Jobs":[ { "Name":"Chef", "StartDate":"1/1/2016", "EndDate":"5/1/2016", "Location":"Haifa", "Description":"Chef in italian restaurant", "Requirements":"little experience", "Phone":"050-0000000" }, { "Name":"Mailman", "StartDate":"1

我的json文件:DB.json

{
"Jobs":[
{
"Name":"Chef",
"StartDate":"1/1/2016",
"EndDate":"5/1/2016",
"Location":"Haifa",
"Description":"Chef in italian restaurant",
"Requirements":"little experience",
"Phone":"050-0000000"
},
{
"Name":"Mailman",
"StartDate":"11/1/2016",
"EndDate":"21/1/2016",
"Location":"Akko",
"Description":"two hours shift as mailman in Haifa area",
"Requirements":"knowledge of the city locations",
"Phone":"050-0000001"
},
{
"Name":"Waiter",
"StartDate":"10/1/2016",
"EndDate":"29/1/2016",
"Location":"Tel Aviv",
"Description":"Double shifts at beach restaurants in haifa",
"Requirements":"couple months of experience",
"Phone":"050-0000002"
},
{
"Name":"Barman",
"StartDate":"15/2/2016",
"EndDate":"22/2/2016",
"Location":"Beer sheva",
"Description":"For morning shifts at good bar in the city center",
"Requirements":"Done it before",
"Phone":"050-0000003"
},
{
"Name":"Dishwasher",
"StartDate":"17/1/2016",
"EndDate":"1/2/2016",
"Location":"Ashdod",
"Description":"Needed for night shifts at most",
"Requirements":"None",
"Phone":"050-0000004"
}
]}
对象适配器的我的类:

package com.example.rami.jobseeker;


    public class Jobs {
        private String name;
        private String StartD;
        private String EndD;
        private String Location;
        private String Des;
        private String Req;
        private String phone;
有二传手和接球手

我需要在末尾的jobs数组中添加一个对象,现在我可以读取一个json文件并将其转换为字符串,然后将数据放入列表中。
但现在我想写入它,而不是仅仅读取它。

您的示例解释了如何写入新文件,我想添加到现有的json文件中。