Пример #1
0
 public AlertTypes(JSONObject json) {
   try {
     mobile = json.getBoolean("sms");
     email = json.getBoolean("email");
   } catch (JSONException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
 }
Пример #2
0
 public AlertSettings(JSONObject json) {
   try {
     timeoff = new AlertTypes(json.getJSONObject("timeoff"));
     swaps = new AlertTypes(json.getJSONObject("swaps"));
     schedule = new AlertTypes(json.getJSONObject("schedule"));
     manager_messages = new AlertTypes(json.getJSONObject("manager_messages"));
     employee_messages = new AlertTypes(json.getJSONObject("employee_messages"));
     reminders = new AlertTypes(json.getJSONObject("reminders"));
     availability = new AlertTypes(json.getJSONObject("availability"));
     new_employee = new AlertTypes(json.getJSONObject("new_employee"));
   } catch (JSONException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
 }