Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joargp/pathfinder_ex
jsonpath for elixir through nodejs
https://github.com/joargp/pathfinder_ex
elixir jsonpath
Last synced: about 1 month ago
JSON representation
jsonpath for elixir through nodejs
- Host: GitHub
- URL: https://github.com/joargp/pathfinder_ex
- Owner: joargp
- License: mit
- Created: 2019-08-26T19:08:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-06T15:19:33.000Z (over 1 year ago)
- Last Synced: 2024-10-30T00:34:11.590Z (3 months ago)
- Topics: elixir, jsonpath
- Language: Elixir
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```elixir
def deps do
[
{:pathfinder, "~> 0.1.0"}
]
end
```
1. Run `mix deps.get`
1. Copy NodeJS files
`cp -a deps/pathfinder/node ./`
1. Install NodeJS dependencies
`cd node && npm install`## Test drive it
```elixir
⇒ 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](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/pathfinder](https://hexdocs.pm/pathfinder).## Dev status
- [x] .query/2
- [x] .query/3
- [ ] .paths
- [ ] .nodes
- [ ] .parse
- [ ] .parent
- [ ] .value
- [ ] .stringify