Skip to content

Commit f9eb40d

Browse files
committed
add put(key, JSONArray) to JSONBuilder
1 parent 9b20fec commit f9eb40d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

custom/src/main/java/com/isolpro/custom/JSONBuilder.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import android.util.Log;
44

5+
import org.json.JSONArray;
56
import org.json.JSONException;
67
import org.json.JSONObject;
78

@@ -75,6 +76,14 @@ public JSONBuilder put(String key, JSONObject jsonObject) {
7576
return put(key, jsonObject, true);
7677
}
7778

79+
public JSONBuilder put(String key, JSONArray jsonArray, boolean toPut) {
80+
return putHandled(key, jsonArray, toPut);
81+
}
82+
83+
public JSONBuilder put(String key, JSONArray jsonArray) {
84+
return put(key, jsonArray, true);
85+
}
86+
7887
public JSONObject build() {
7988
return jsonObject;
8089
}

0 commit comments

Comments
 (0)