-
Notifications
You must be signed in to change notification settings - Fork 8
Save Object
Hendra Permana edited this page May 6, 2017
·
1 revision
.saveObject(object)
Example :
Profile mProfile = new Gson().fromJson(jsonObjectString, Profile.class);
gsonSharedPreferences.saveObject(mProfile);
.saveObject(jsonObject);
Example :
jsonObject = new JSONObject(jsonObjectString);
gsonSharedPreferences.saveObject(jsonObject);
.saveObject(jsonObjectString)
Example :
-
jsonObjectString
:
{
"user_id": 667,
"user_name": "blog",
"website": "http://blog.hynra.com"
}
- code :
gsonSharedPreferences.saveObject(jsonObjectString);