Android Utililty Methods JSON Insert

List of utility methods to do JSON Insert


The list of methods to do JSON Insert are organized into topic(s).


voidinsertJSONArrayContent( ContentResolver contentResolver, Uri uri, JSONArray array)
insert JSON Array Content
Log.i("uri", uri.toString());
for (int i = 0; i < array.length(); i++) {
    insertJSONObjectContent(contentResolver, uri,
voidinsertJSONObjectContent( ContentResolver contentResolver, Uri uri, JSONObject obj)
insert JSON Object Content
ContentValues values = new ContentValues();
Iterator<String> it = (Iterator<String>) obj.keys();
while (it.hasNext()) {
    String key =;
    values.put(key, obj.getString(key));
contentResolver.insert(uri, values);
JSONArrayconcatArray(JSONArray arr1, JSONArray arr2)
concat Array
JSONArray result = new JSONArray();
for (int i = 0; i < arr1.length(); i++) {
for (int i = 0; i < arr2.length(); i++) {
return result;