Home | History | Annotate | Download | only in model

Lines Matching refs:jsonObject

23 import org.json.JSONObject;
32 public static SavedAutofillValue fromJson(JSONObject jsonObject) {
33 if (jsonObject == null) {
40 !jsonObject.isNull("textValue") ? jsonObject.getString("textValue") : null;
42 !jsonObject.isNull("dateValue") ? jsonObject.getLong("dateValue") : null;
44 (!jsonObject.isNull("toggleValue") ? jsonObject.getBoolean("toggleValue") : null);
73 public JSONObject toJson() {
74 JSONObject jsonObject = new JSONObject();
76 jsonObject.put("textValue", textValue != null ? textValue : JSONObject.NULL);
77 jsonObject.put("dateValue", dateValue != null ? dateValue : JSONObject.NULL);
78 jsonObject.put("toggleValue", toggleValue != null ? toggleValue : JSONObject.NULL);
79 return jsonObject;