code: private void serializeAliasedDiscoveryConfig(
              JsonObject object, String tag, AliasedDiscoveryConfig config) {
          if (config != null) {
              object.add(tag, new AliasedDiscoveryConfigDTO(config).toJson());
          }
      }
docs: Serializes the provided aliased discovery config and adds the serialized
  contents under the tag in the JSON object if the config is not
  {@code null}.
  
  @param object the JSON object to which the config is added
  @param tag    the tag under which the config is added
  @param config the configuration