code: private static void registerAllTypeFactories(GsonBuilder gsonBuilder) {
          ServiceLoader<TypeAdapterFactory> loader = ServiceLoader.load(TypeAdapterFactory.class);
          for (TypeAdapterFactory typeFactory : loader) {
              if (logger.isLoggable(Level.FINE)) {
                  logger.fine("Add gson type factory: " + typeFactory.getClass().getName());
              }
              gsonBuilder.registerTypeAdapterFactory(typeFactory);
          }
      }
docs: Find and register all gson type factory using spi