Skip to content

joargp/pathfinder_ex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pathfinder

jsonpath in elixir through nodejs

made possible thanks to reverly labs' library https://hex.pm/packages/nodejs

⚠️WIP. This is an early and uncomplete release, expect breaking changes

Installation

Prerequisite

  • Installation of nodejs

Steps

  1. Add pathfinder to your mix.exs
def deps do
  [
    {:pathfinder, "~> 0.1.0"}
  ]
end
  1. Run mix deps.get
  2. Copy NodeJS files cp -a deps/pathfinder/node ./
  3. Install NodeJS dependencies cd node && npm install

Test drive it

iex -S mix
Erlang/OTP 22 [erts-10.4.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe] [dtrace]

Interactive Elixir (1.8.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> Pathfinder.query("{\"test\": 1}","$..test")
{:ok, [1]}
iex(2)>

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/pathfinder.

Dev status

  • .query/2
  • .query/3
  • .paths
  • .nodes
  • .parse
  • .parent
  • .value
  • .stringify

About

jsonpath for elixir through nodejs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published