JsonNode rootNode = parseLocationField(locationField);
JsonNode pathNode = rootNode.path(path);
Set<String> url = new HashSet<String>();
if (pathNode.isMissingNode()){
throw new JsonParseException("The Object '" + path + "' could not be found.", null);
} else if (pathNode.isArray()){
ArrayNode urls = (ArrayNode) rootNode.path(path);
for(JsonNode currentUrl: urls){
url.add(currentUrl.getTextValue());
}
} else if (pathNode.isTextual()){
url.add(pathNode.getTextValue());
}
if (url == null || url.isEmpty()){
throw new JsonParseException("The Object '" + path + "' is empty.", null);
}
List<String> urlList = new ArrayList<String>();
urlList.addAll(url);
return urlList;