private JsonNode getOrThrow(JsonNode node, String key) {
        String[] path = key.split("\\.");

        JsonNode currentNode = node;

        for (String pathElement : path) {
            if (currentNode.hasNonNull(pathElement)) {
                currentNode = currentNode.get(pathElement);
            } else {
                throw new CliException("Required element '" + pathElement + "' does not exist from " + key + ". "
                    + "File may be corrupted or altered?");
            }
        }

        return currentNode;
    }
Override this method to visit an API Version
migration-assistant/src/main/java/io/apiman/migration/fix_pre_21/ApimanExportVisitor.java