Class OutputFormat.Hierarchical

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

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

    • Hierarchical

      public Hierarchical()
    • Hierarchical

      public Hierarchical(Function<ValidationMessage,Object> assertionMapper)
      Constructor.
      Parameters:
      assertionMapper - to map the assertion
  • Method Details

    • customize

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

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

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

      public OutputUnit format(JsonSchema jsonSchema, Set<ValidationMessage> validationMessages, ExecutionContext executionContext, ValidationContext validationContext)
      Description copied from interface: OutputFormat
      Formats the validation results.
      Specified by:
      format in interface OutputFormat<OutputUnit>
      Parameters:
      jsonSchema - the schema
      validationMessages - the validation messages
      executionContext - the execution context
      validationContext - the validation context
      Returns:
      the result