code: public static JsonObject toJson( IGeneratorSet generatorSet)
      {
      JsonObjectBuilder builder = Json.createObjectBuilder();
  
      for( String function : generatorSet.getGeneratorFunctions())
        {
        builder.add( function, toJson( generatorSet.getGenerator( function)));
        }
  
      return builder.build();
      }
docs: Returns the JSON object that represents the given generator set.