public class SharedPreferencesSerializer extends java.lang.Object implements JSONPreferenceSerializer
Constructor and Description |
---|
SharedPreferencesSerializer(android.content.Context appContext) |
SharedPreferencesSerializer(android.content.SharedPreferences prefs) |
Modifier and Type | Method and Description |
---|---|
boolean |
readJSON(org.json.JSONObject root)
Read content from JSON root element
|
boolean |
writeJSON(org.json.JSONObject root)
Serialize content to JSON in a given root element
|
public SharedPreferencesSerializer(android.content.SharedPreferences prefs)
public SharedPreferencesSerializer(android.content.Context appContext)
public boolean writeJSON(org.json.JSONObject root)
JSONPreferenceSerializer
writeJSON
in interface JSONPreferenceSerializer
root
- Root element (where the preference output is added)public boolean readJSON(org.json.JSONObject root)
JSONPreferenceSerializer
readJSON
in interface JSONPreferenceSerializer
root
- Root element (where the preference input is read)