code: private SortedSet<WeekDay> readWeekDays(JSONObject val) {
  
          try {
              JSONArray array = val.getJSONArray(JsonKey.PATTERN_WEEKDAYS);
              if (null != array) {
                  SortedSet<WeekDay> result = new TreeSet<>();
                  for (int i = 0; i < array.length(); i++) {
                      try {
                          result.add(WeekDay.valueOf(array.getString(i)));
                      } catch (JSONException | IllegalArgumentException e) {
                          LOG.error("Could not read weekday from JSON. Skipping that day.", e);
                      }
                  }
                  return result;
              }
          } catch (JSONException e) {
              LOG.debug("Could not read weekdays from JSON", e);
          }
          return new TreeSet<>();
  
      }
docs: Reads the weekday information.
  @param val the JSON object containing the weekday information.
  @return the weekdays extracted, defaults to the empty list, if no information is found.