private void writeMapSimple(SerIterator itemIterator) throws IOException {
        StringConverter<Object> keyConverter = settings.getConverter().findConverterNoGenerics(itemIterator.keyType());
        output.writeObjectStart();
        while (itemIterator.hasNext()) {
            itemIterator.next();
            Object key = itemIterator.key();
            if (key == null) {
                throw new IllegalArgumentException("Unable to write map key as it cannot be null");
            }
            String str = keyConverter.convertToString(itemIterator.key());
            if (str == null) {
                throw new IllegalArgumentException("Unable to write map key as it cannot be a null string");
            }
            output.writeObjectKey(str);
            writeObject(itemIterator.valueType(), itemIterator.value(), itemIterator);
        }
        output.writeObjectEnd();
    }
private void writeMapSimple ( SerIterator itemIterator ) throws IOException { StringConverter < Object > keyConverter = settings . getConverter ( ) . findConverterNoGenerics ( itemIterator . keyType ( ) ) ; output . writeObjectStart ( ) ; while ( itemIterator . hasNext ( ) ) { itemIterator . next ( ) ; Object key = itemIterator . key ( ) ; if ( key == null ) { throw new IllegalArgumentException ( "Unable to write map key as it cannot be null" ) ; } String str = keyConverter . convertToString ( itemIterator . key ( ) ) ; if ( str == null ) { throw new IllegalArgumentException ( "Unable to write map key as it cannot be a null string" ) ; } output . writeObjectKey ( str ) ; writeObject ( itemIterator . valueType ( ) , itemIterator . value ( ) , itemIterator ) ; } output . writeObjectEnd ( ) ; }
write map with simple keys