from
Convenience parser that delegates to the encoding-specific factory matching path's prefix:
A string starting with
/is parsed via fromKPointer (strict RFC 6901).A string starting with
#is parsed via fromFragment (RFC 6901 §6 URI fragment).Anything else — including the empty string — is parsed via fromDotNotation (Mustache-style dot notation).
If you know the encoding of path in advance, prefer the specific factory (fromKPointer, fromFragment, or fromDotNotation) so that mis-encoded input fails with a precise message rather than being silently interpreted as a different encoding.
Return
A KPointer equivalent to the result of the delegated factory.
Parameters
path
The pointer string to parse.
Throws
with the message from whichever delegated factory rejected the input.