public void serializeContents(Iterable<?> value, JsonGenerator jgen, SerializerProvider provider)
throws IOException, JsonGenerationException
{
Iterator<?> it = value.iterator();
if (it.hasNext()) {
final TypeSerializer typeSer = _valueTypeSerializer;
JsonSerializer<Object> prevSerializer = null;
Class<?> prevClass = null;
do {
Object elem = it.next();