code: private Object writeMapComplex(SerIterator itemIterator) {
          Map<String, Object> result = new LinkedHashMap<>();
          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 = settings.getConverter().convertToString(itemIterator.key());
              if (str == null) {
                  throw new IllegalArgumentException("Unable to write map key as it cannot be a null string");
              }
              result.put(str, writeObject(itemIterator.valueType(), itemIterator.value(), itemIterator));
          }
          return result;
      }
docs: write map with complex keys