public static Optional deserializeObject(JsonNode root) {
        if (!root.isObject()) {
            throw new IllegalArgumentException("root needs to be an object");
        }
        if (!root.has(TikaJsonSerializer.INSTANTIATED_CLASS_KEY)) {
            throw new IllegalArgumentException("need to specify: " + TikaJsonSerializer.INSTANTIATED_CLASS_KEY);
        }
        String className = root
                .get(TikaJsonSerializer.INSTANTIATED_CLASS_KEY)
                .asText();

        try {
            return Optional.of(deserialize(Class.forName(className), root));
        } catch (Exception e) {
            throw new IllegalArgumentException(e);
        }
    }
See the notes @link{TikaJsonSerializer}.
<p>
This currently requires a setString() option on objects that have enum parameters.
tika-serialization/src/main/java/org/apache/tika/serialization/TikaJsonDeserializer.java