Class JsonNodeUtil
java.lang.Object
com.networknt.schema.utils.JsonNodeUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<String> private static longdetectVersion(ValidationContext validationContext) static booleanequalsToSchemaType(com.fasterxml.jackson.databind.JsonNode node, JsonType schemaType, JsonSchema parentSchema, ValidationContext validationContext) private static booleanisEnumObjectSchema(JsonSchema jsonSchema) 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.private static voidvisitArray(PathType pathType, String root, com.fasterxml.jackson.databind.JsonNode node, Collection<String> collector) private static voidvisitNode(PathType pathType, String root, com.fasterxml.jackson.databind.JsonNode node, Collection<String> collector) private static voidvisitObject(PathType pathType, String root, com.fasterxml.jackson.databind.JsonNode node, Collection<String> collector)
-
Field Details
-
V6_VALUE
private static final long V6_VALUE -
TYPE
- See Also:
-
ENUM
- See Also:
-
REF
- See Also:
-
NULLABLE
- See Also:
-
-
Constructor Details
-
JsonNodeUtil
public JsonNodeUtil()
-
-
Method Details
-
allPaths
public static Collection<String> allPaths(PathType pathType, String root, com.fasterxml.jackson.databind.JsonNode node) -
visitNode
private static void visitNode(PathType pathType, String root, com.fasterxml.jackson.databind.JsonNode node, Collection<String> collector) -
visitArray
private static void visitArray(PathType pathType, String root, com.fasterxml.jackson.databind.JsonNode node, Collection<String> collector) -
visitObject
private static void visitObject(PathType pathType, String root, com.fasterxml.jackson.databind.JsonNode node, Collection<String> collector) -
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) -
detectVersion
-
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
-
isEnumObjectSchema
-