code: private String validatePath(String path, int line) throws ParseException {
  		if (!path.startsWith("/")) {
  			throw new ParseException("Path must start with '/'", line);
  		}
  
  		boolean openedKey = false;
  		for (int i=0; i < path.length(); i++) {
  
  			boolean validChar = isValidCharForPath(path.charAt(i), openedKey);
  			if (!validChar) {
  				throw new ParseException(path, i);
  			}
  
  			if (path.charAt(i) == '{') {
  				openedKey = true;
  			}
  
  			if (path.charAt(i) == '}') {
  				openedKey = false;
  			}
  
  		}
  
  		return path;
  	}
docs: Helper method. It validates if the path is valid.
  
  @param path the path to be validated
  
  @return the same path that was received as an argument.
  @throws ParseException if the path is not valid.