{"record":{"id":"1a2a42ecad12435e","repo":"eclipse-vertx/vert.x","slug":"the-provided-pointer-is-not-a-valid-json-pointer","errorCode":null,"errorMessage":"The provided pointer is not a valid JSON Pointer","messagePattern":"The provided pointer is not a valid JSON Pointer","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/json/pointer/impl/JsonPointerImpl.java","lineNumber":71,"sourceCode":"  }\n\n  public JsonPointerImpl(URI startingUri, List<String> decodedTokens) {\n    this.startingUri = startingUri;\n    this.decodedTokens = new ArrayList<>(decodedTokens);\n  }\n\n  private ArrayList<String> parse(String pointer) {\n    if (pointer == null || \"\".equals(pointer)) {\n      return new ArrayList<>();\n    }\n    if (VALID_POINTER_PATTERN.matcher(pointer).matches()) {\n      return Arrays\n          .stream(pointer.split(\"\\\\/\", -1))\n          .skip(1) //Ignore first element\n          .map(this::unescape)\n          .collect(Collectors.toCollection(ArrayList::new));\n    } else\n      throw new IllegalArgumentException(\"The provided pointer is not a valid JSON Pointer\");\n  }\n\n  private String escape(String path) {\n    return path.replace(\"~\", \"~0\")\n        .replace(\"/\", \"~1\");\n  }\n\n  private String unescape(String path) {\n    return path.replace(\"~1\", \"/\") // https://tools.ietf.org/html/rfc6901#section-4\n        .replace(\"~0\", \"~\");\n  }\n\n  @Override\n  public boolean isRootPointer() {\n    return decodedTokens.size() == 0;\n  }\n\n  @Override","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/json/pointer/impl/JsonPointerImpl.java#L53-L89","documentation":"Parsing failure in JsonPointerImpl.parse: the pointer string does not match the RFC 6901 JSON Pointer grammar (valid pattern: optional URI fragment, then '/'-prefixed tokens with ~0/~1 escapes). The exception is thrown during JsonPointer construction; the input at fault is the pointer string.","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/json/pointer/impl/JsonPointerImpl.java:71 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a valid pointer like '/a/b' or the empty pointer","Escape '~' as '~0' and '/' as '~1' inside tokens","Validate pointer strings from untrusted input before constructing JsonPointer"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fb308bd8c3f12c79f4ae89bef67fadf6c80d036e","analyzedAt":"2026-09-06T11:37:12.241Z","contentChangedAt":"2026-09-06T11:37:12.241Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}