code: private static JsonStructure toJson( TupleCombiner combiner)
      {
      JsonObjectBuilder builder = Json.createObjectBuilder();
  
      builder.add( TUPLES_KEY, combiner.getTupleSize());
  
      JsonArrayBuilder includeBuilder = Json.createArrayBuilder();
      Arrays.stream( combiner.getIncluded()).forEach( var -> includeBuilder.add( var));
      JsonArray include = includeBuilder.build();
      if( !include.isEmpty())
        {
        builder.add( INCLUDE_KEY, include);
        }
  
      JsonArrayBuilder excludeBuilder = Json.createArrayBuilder();
      Arrays.stream( combiner.getExcluded()).forEach( var -> excludeBuilder.add( var));
      JsonArray exclude = excludeBuilder.build();
      if( !exclude.isEmpty())
        {
        builder.add( EXCLUDE_KEY, exclude);
        }
  
      JsonArrayBuilder onceBuilder = Json.createArrayBuilder();
      toStream( combiner.getOnceTuples()).forEach( tuple -> onceBuilder.add( toJson( tuple)));
      JsonArray once = onceBuilder.build();
      if( !once.isEmpty())
        {
        builder.add( ONCE_KEY, once);
        }
  
      return builder.build();
      }
docs: Returns the JSON object that represents the given combiner.