1

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.

asked Aug 25, 2011 at 13:28
1

1 Answer 1

8

try this:

JSONArray jArrayObject = new JSONArray();
jArrayObject.put(getJsonObject());
private static JSONObject getJsonObject() throws JSONException {
 JSONObject jObject = new JSONObject();
 //put value jObject here..
}
answered Aug 25, 2011 at 13:38
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.