Jaxon.Path.parse
You're seeing just the function
parse
, go back to Jaxon.Path module for more information.
Specs
parse(String.t()) :: {:ok, t()} | {:error, Jaxon.ParseError.t()}
Parse path expressions:
iex> Jaxon.Path.parse("$[*].pets[0]")
{:ok, [:root, :all, "pets", 0]}
iex> Jaxon.Path.parse(~s($["key with spaces"].pets[0]))
{:ok, [:root, "key with spaces", "pets", 0]}
How to handle parse errors;
iex> Jaxon.Path.parse("$.\"test[x]")
{:error, %Jaxon.ParseError{message: "Ending quote not found for string at `\"test[x]`"}}