Class Draft2020EvaluatorFactory

java.lang.Object
dev.harrel.jsonschema.Draft2020EvaluatorFactory
All Implemented Interfaces:
EvaluatorFactory

public class Draft2020EvaluatorFactory extends Object
EvaluatorFactory implementation that supports 2020 draft specification.
  • Constructor Details

    • Draft2020EvaluatorFactory

      public Draft2020EvaluatorFactory()
  • Method Details

    • create

      public Optional<Evaluator> create(SchemaParsingContext ctx, String fieldName, JsonNode node)
      Description copied from interface: EvaluatorFactory
      This method will be invoked for each JSON object field during schema parsing process. Must not throw any exceptions.
      Specified by:
      create in interface EvaluatorFactory
      Parameters:
      ctx - current schema parsing context
      fieldName - field name (keyword) in JSON object for which Evaluator should be created
      node - value of field in JSON object
      Returns:
      If this factory supports given field name (keyword) it should return corresponding Evaluator wrapped in Optional, Optional.empty() otherwise.