简体   繁体   中英

android how to convert the json object to json array

i'm trying to create an application about convert the json object to json array. If it's possible means tell me the way, otherwise, tell the alternate way. Thanks in advance.

try this:

JSONArray jArrayObject = new JSONArray();
jArrayObject.put(getJsonObject());

private static JSONObject getJsonObject() throws JSONException {
    JSONObject jObject = new JSONObject();
    //put value jObject here..
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM