@Override
  public JsonObjectBuilder buildJsonObjectBuilder() throws NullPointerException {
    if (this.browserSpecs == null) {
      return Json.createObjectBuilder().add("BROWSER_SPEC", "NOT_FOUND");
    }
    JsonObjectBuilder builder = Json.createObjectBuilder()
      .add("platform", this.browserSpecs.getPlatform().name());
    if (this.name != null) {
      builder.add("name", this.name);
    }
    if (this.capability.getGateway() != null) {
      builder.add("gateway", this.capability.getGateway().toString());
    }
    if (this.count != null) {
      builder.add("count", this.count);
    }
    if (this.exclude != null) {
      builder.add("exclude", this.exclude);
    }
    if (this.paas != null) {
      builder.add("paas", this.paas.getType().name());
      builder.add("remoteUrl", this.paas.getUrl());
    }
    if (isApp()) {
      builder.add("app", app.buildJsonObjectBuilder());
    } else {
      builder.add("browserName", this.browserSpecs.getBrowserName())
              .add("headless", this.capability.isHeadless() == null ? false : this.capability.isHeadless())
              .add("technologyPreview", this.capability.isTechnologyPreview() == null ? false : this.capability.isTechnologyPreview());
      if (this.browserSpecs.getVersion() != null) {
        builder.add("version", this.browserSpecs.getVersion());
      }
      if (this.capability.useFakeMedia() != null) {
        builder.add("useFakeMedia", this.capability.useFakeMedia());
      }
      if (this.capability.getWindowSize() != null) {
        builder.add("windowSize", this.capability.getWindowSize());
      }
      if (this.capability.getFlags() != null) {
        JsonArrayBuilder jsonArrayBuilder = Json.createArrayBuilder();
        for (int i = 0; i < this.capability.getFlags().size(); i++) {
          jsonArrayBuilder.add(this.capability.getFlags().get(i));
        }
        builder.add("flags", jsonArrayBuilder.build());
      }
      if (this.capability.getExtraCapabilities() != null && !this.capability.getExtraCapabilities().isEmpty()) {
        for (Map.Entry<String, String> entry : this.capability.getExtraCapabilities().entrySet()) {
          builder.add(entry.getKey(), entry.getValue());
        }
      }
    }

    if (this.paas != null && this.paas.getGridId() != null) {
      builder.add("gridId", this.paas.getGridId());
    }

    return builder;
  }
Sets exclude.

@param exclude the exclude
KITE-Framework/src/main/java/org/webrtc/kite/config/client/Client.java