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
user896780
-
1json.org/javadoc/org/json/JSONObject.htmlBlundell– Blundell2011年08月25日 13:33:07 +00:00Commented Aug 25, 2011 at 13:33
1 Answer 1
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
Vineet Shukla
24.1k10 gold badges58 silver badges63 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
lang-java