Package com.networknt.schema.utils
Class JsonNodeUtil
java.lang.Object
com.networknt.schema.utils.JsonNodeUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<String> static booleanequalsToSchemaType(com.fasterxml.jackson.databind.JsonNode node, JsonType schemaType, JsonSchema parentSchema, ValidationContext validationContext) static booleanisNodeNullable(com.fasterxml.jackson.databind.JsonNode schema) static booleanisNodeNullable(com.fasterxml.jackson.databind.JsonNode schema, SchemaValidatorsConfig config) static booleanisNumber(com.fasterxml.jackson.databind.JsonNode node, SchemaValidatorsConfig config) Check if the type of the JsonNode's value is number based on the status of typeLoose flag.
-
Constructor Details
-
JsonNodeUtil
public JsonNodeUtil()
-
-
Method Details
-
allPaths
public static Collection<String> allPaths(PathType pathType, String root, com.fasterxml.jackson.databind.JsonNode node) -
isNodeNullable
public static boolean isNodeNullable(com.fasterxml.jackson.databind.JsonNode schema) -
isNodeNullable
public static boolean isNodeNullable(com.fasterxml.jackson.databind.JsonNode schema, SchemaValidatorsConfig config) -
equalsToSchemaType
public static boolean equalsToSchemaType(com.fasterxml.jackson.databind.JsonNode node, JsonType schemaType, JsonSchema parentSchema, ValidationContext validationContext) -
isNumber
public static boolean isNumber(com.fasterxml.jackson.databind.JsonNode node, SchemaValidatorsConfig config) Check if the type of the JsonNode's value is number based on the status of typeLoose flag.- Parameters:
node- the JsonNode to checkconfig- the SchemaValidatorsConfig to depend on- Returns:
- boolean to indicate if it is a number
-