code: private boolean isSerializableType(Class<?> type) {
      Boolean serializable = cache.get(type);
      if (serializable != null) {
        return serializable;
      }
  
      if (type == Object.class) {
        return true;
      }
  
      if (primitiveTypes.contains(type)) {
        cache.put(type, true);
        return true;
      }
  
      if (JsonSerializable.class.isAssignableFrom(type)) {
        cache.put(type, true);
        return true;
      }
  
      for (Class<?> clazz : serializableTypes) {
        if (clazz.isAssignableFrom(type)) {
          cache.put(type, true);
          return true;
        }
      }
      cache.put(type, false);
      return false;
    }
docs: Indicates whether the given type is a "serializable" type.