code: private static JsonStructure toJson( FunctionInputDef functionInput)
      {
      JsonObjectBuilder builder = Json.createObjectBuilder();
  
      addAnnotations( builder, functionInput);
  
      Arrays.stream( functionInput.getVarTypes()).forEach( varType -> builder.add( varType, toJson( functionInput, varType)));
  
      return builder.build();
      }
docs: Returns the JSON object that represents the given function input definition.