app/src/main/java/csc445/missouriwestern/edu/jaunt/utils/userinfo/PersistenceWrapper.java
public static List<JSONObject> loadHoursAsJsonList(){
        List<HoursRecord> hoursRecords = loadHoursRecords();
        if(hoursRecords == null) return null;
        List<JSONObject> hoursRecordsJson = new ArrayList<>();
        for(int i=0; i<hoursRecords.size(); i++){
            List<TimeRange> availability = hoursRecords.get(i).getAvailability();
            if(availability == null || availability.size()==0)
                continue;
            hoursRecordsJson.add(hoursRecords.get(i).toJson());
        }
        return hoursRecordsJson;
    }
//if the availability of some day is null, it is not included
if the availability of some day is null, it is not included
if the availability of some day is null it is not included
public static List<JSONObject> loadHoursAsJsonList(){
        List<HoursRecord> hoursRecords = loadHoursRecords();
        if(hoursRecords == null) return null;
        List<JSONObject> hoursRecordsJson = new ArrayList<>();
        for(int i=0; i<hoursRecords.size(); i++){
            List<TimeRange> availability = hoursRecords.get(i).getAvailability();
            if(availability == null || availability.size()==0)
                continue;
            hoursRecordsJson.add(hoursRecords.get(i).toJson());
        }
        return hoursRecordsJson;
    }
public static List < JSONObject > loadHoursAsJsonList ( ) { List < HoursRecord > hoursRecords = loadHoursRecords ( ) ; if ( hoursRecords == null ) return null ; List < JSONObject > hoursRecordsJson = new ArrayList < > ( ) ; for ( int i = 0 ; i < hoursRecords . size ( ) ; i ++ ) { List < TimeRange > availability = hoursRecords . get ( i ) . getAvailability ( ) ; if ( availability == null || availability . size ( ) == 0 ) continue ; hoursRecordsJson . add ( hoursRecords . get ( i ) . toJson ( ) ) ; } return hoursRecordsJson ; }
if the availability of some day is null, it is not included
if the availability of some day is null it is not included