Package com.networknt.schema.utils
Class JsonNodeUtil
- java.lang.Object
-
- com.networknt.schema.utils.JsonNodeUtil
-
public class JsonNodeUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description JsonNodeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanequalsToSchemaType(com.fasterxml.jackson.databind.JsonNode node, JsonSchema schema, SchemaValidatorsConfig config)static booleanequalsToSchemaType(com.fasterxml.jackson.databind.JsonNode node, JsonType schemaType, JsonSchema parentSchema, SchemaValidatorsConfig config)static JsonTypegetSchemaJsonType(JsonSchema schema)static booleanisChildNodeNullable(com.fasterxml.jackson.databind.node.ArrayNode oneOfSchemaNode, SchemaValidatorsConfig config)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.static booleanmatchOneOfTypeNode(com.fasterxml.jackson.databind.JsonNode oneOfSchemaNode, JsonType nodeType)
-
-
-
Method Detail
-
isNodeNullable
public static boolean isNodeNullable(com.fasterxml.jackson.databind.JsonNode schema)
-
isNodeNullable
public static boolean isNodeNullable(com.fasterxml.jackson.databind.JsonNode schema, SchemaValidatorsConfig config)
-
isChildNodeNullable
public static boolean isChildNodeNullable(com.fasterxml.jackson.databind.node.ArrayNode oneOfSchemaNode, SchemaValidatorsConfig config)
-
matchOneOfTypeNode
public static boolean matchOneOfTypeNode(com.fasterxml.jackson.databind.JsonNode oneOfSchemaNode, JsonType nodeType)
-
equalsToSchemaType
public static boolean equalsToSchemaType(com.fasterxml.jackson.databind.JsonNode node, JsonSchema schema, SchemaValidatorsConfig config)
-
getSchemaJsonType
public static JsonType getSchemaJsonType(JsonSchema schema)
-
equalsToSchemaType
public static boolean equalsToSchemaType(com.fasterxml.jackson.databind.JsonNode node, JsonType schemaType, JsonSchema parentSchema, SchemaValidatorsConfig config)
-
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
-
-