Class OutputFormat.List

java.lang.Object
com.networknt.schema.OutputFormat.List
All Implemented Interfaces:
OutputFormat<OutputUnit>
Enclosing interface:
OutputFormat<T>

public static class OutputFormat.List extends Object implements OutputFormat<OutputUnit>
The List output format.
  • Constructor Details

    • List

      public List()
    • List

      public List(Function<Error,Object> errorMapper)
      Constructor.
      Parameters:
      errorMapper - to map the error
  • Method Details

    • customize

      public void customize(ExecutionContext executionContext, SchemaContext schemaContext)
      Description copied from interface: OutputFormat
      Customize the execution context before validation.

      The schema context should only be used for reference as it is shared.

      Specified by:
      customize in interface OutputFormat<OutputUnit>
      Parameters:
      executionContext - the execution context
      schemaContext - the schema context for reference
    • format

      public OutputUnit format(Schema jsonSchema, ExecutionContext executionContext, SchemaContext schemaContext)
      Description copied from interface: OutputFormat
      Formats the validation results.
      Specified by:
      format in interface OutputFormat<OutputUnit>
      Parameters:
      jsonSchema - the schema
      executionContext - the execution context
      schemaContext - the schema context
      Returns:
      the result