code: public static EscEvents create(final JsonArray jsonArray) {
          final List<EscEvent> events = new ArrayList<>();
          for (final JsonValue jsonValue : jsonArray) {
              if (jsonValue.getValueType() != JsonValue.ValueType.OBJECT) {
                  throw new IllegalArgumentException(
                          "All elements in the JSON array must be an JsonObject, but was: " + jsonValue.getValueType());
              }
              events.add(EscEvent.create((JsonObject) jsonValue));
          }
          return new EscEvents(events);
      }
docs: Creates in instance from the given JSON array.
  
  @param jsonArray
  Array to read values from.
  
  @return New instance.