private void writeAsArrayList(List<ID> list, DataOutput out,
      SerializationContext context) throws IOException {
    int size;
    if (list == null) {
      size = -1;
    } else {
      size = list.size();
    }
    StaticSerialization.writeArrayLength(size, out);
    if (size > 0) {
      for (int i = 0; i < size; i++) {
        context.getSerializer().writeObject(list.get(i), out);
      }
    }
  }
this will deserialize as an ArrayList
geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/GMSMembershipView.java