How to save JSON Array in SharedPreferences?
<p>I am new in Android. I want to save JSON Array in Shared Preferences.</p>

<p><strong>Here is My Java Code:</strong></p>

<pre><code>while (managedCursor.moveToNext())
{
    JSONObject jsonObject = new JSONObject();
    try
    {
        jsonObject.put("number", number);
        jsonObject.put("type", type);
        jsonObject.put("fDate", fDate);
        jsonObject.put("duration", duration);
    }
    catch (Exception e)
    {
        e.printStackTrace();
    }
    jsonArray.put(jsonObject);
}
managedCursor.close();
Log.d("array", jsonArray.toString());
</code></pre>