code: public static JsonPath compile(String expression) {
          ParserResult parserResult = new RecoveringPathParser().parse(expression);
  
          if (parserResult.getProblems().isEmpty()) {
              return new JsonPath(expression, parserResult.getPathComponent());
          }
  
          throw new InvalidJsonPathExpressionException(getMessage(parserResult.getProblems()));
      }
docs: Compiles the given JSONPath expression into a {@link JsonPath}
  
  @param expression The expression to compile
  
  @return A {@link JsonPath} that can be used to read content from JSON payloads
  
  @throws InvalidJsonPathExpressionException if the {@code expression} argument is not a legal JSONPath expression