fromDotNotation

Creates a JsonPointer from a Mustache-style dot-notation path string.

Unlike fromJsonPointer, this parser uses . as the segment separator and performs no escape decoding: the segments of the returned pointer are exactly the substrings between dots.

Parsing rules:

  • An empty string, or a string consisting entirely of . characters (".", "..", etc.), returns ROOT. Such strings carry no segment information.

  • Otherwise, if the string starts with ., the leading . is stripped (so ".foo.bar" parses identically to "foo.bar").

  • The remaining string is split on .. Each resulting substring becomes one segment verbatim.

  • Empty segments are rejected. Trailing dots ("foo."), consecutive dots ("foo..bar"), and leading double dots followed by content ("..foo") all produce empty segments and therefore throw.

Return

A JsonPointer whose segments correspond to the dot-separated tokens of path.

Parameters

path

The dot-notation path string.

Throws

if path would produce an empty segment.