简体   繁体   English

android如何将json对象转换为json数组

[英]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. 我正在尝试创建一个有关将json对象转换为json数组的应用程序。 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..
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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