convert JSONObject to ContentValues <p>I want to convert JSONObject to ContentValue. How can i do that without knowing what columns i have in JSONObject?</p> <p>columns in JSONObject are the same as columns in SQLite database on the device and they are in the same order.</p> <p>I can do it like this</p> <pre><code>ContentValues values = new ContentValues(); values.put(TASK_NAME, json.getString("name")); values.put(TASK_KEY_PROJECT, json.getString("project")); values.put(TASK_KEY_CATEGORY, json.getString("category")); values.put(TASK_KEY_TAG, json.getString("tag")); //TODO CATCH NO TAG EXCEPTION </code></pre> <p>but i want to know better way thanks in advance</p>