Class JsonNodeTypes

java.lang.Object
com.networknt.schema.utils.JsonNodeTypes

public class JsonNodeTypes extends Object
  • Constructor Details

    • JsonNodeTypes

      public JsonNodeTypes()
  • Method Details

    • isNodeNullable

      public static boolean isNodeNullable(tools.jackson.databind.JsonNode schema)
    • equalsToSchemaType

      public static boolean equalsToSchemaType(tools.jackson.databind.JsonNode node, JsonType schemaType, Schema parentSchema, SchemaContext schemaContext, ExecutionContext executionContext)
    • isNumber

      public static boolean isNumber(tools.jackson.databind.JsonNode node, SchemaRegistryConfig config)
      Check if the type of the JsonNode's value is number based on the status of typeLoose flag.
      Parameters:
      node - the JsonNode to check
      config - the SchemaValidatorsConfig to depend on
      Returns:
      boolean to indicate if it is a number
    • isNonFiniteNumber

      public static boolean isNonFiniteNumber(tools.jackson.databind.JsonNode node)
      Check if the node is a number and is one of NaN, Infinity or -Infinity
      Parameters:
      node - to check
      Returns:
      true if it is NaN, Infinity or -Infinity