Object[] list = (Object[]) o;
oprot.writeListBegin(new TList(mt.getType(), list.length));
for (Object element : list) {
if (element == null && nullProtocol != null) {
assert (nullProtocol != null);
nullProtocol.writeNull();
} else {
mt.serialize(element, elementObjectInspector, oprot);
}
}
}