Package org.apache.tika.serialization
Class OperatorOnlyGuard
java.lang.Object
org.apache.tika.serialization.OperatorOnlyGuard
Refuses per-request JSON that names an
OperatorOnly property. Runs on the JSON
tree before deserialization, so no setter sees the value. Properties are matched the way
Jackson will bind them (declared name and aliases); a key Jackson does not know is left
for Jackson to refuse. Object values are checked against the nested property's type.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheck(com.fasterxml.jackson.databind.ObjectMapper mapper, String configKey, com.fasterxml.jackson.databind.JsonNode node, com.fasterxml.jackson.databind.JavaType type) static voidcheck(com.fasterxml.jackson.databind.ObjectMapper mapper, String configKey, String json, Class<?> configClass)
-
Method Details
-
check
public static void check(com.fasterxml.jackson.databind.ObjectMapper mapper, String configKey, String json, Class<?> configClass) throws IOException - Throws:
IOException- ifjsonnames an operator-only property ofconfigClass
-
check
public static void check(com.fasterxml.jackson.databind.ObjectMapper mapper, String configKey, com.fasterxml.jackson.databind.JsonNode node, com.fasterxml.jackson.databind.JavaType type) throws IOException - Throws:
IOException- ifnodenames an operator-only property oftype
-