Elixir bindings for libjq, library form of the popular command-line JSON processing tool jq.
iex> program = Libjq.compile(".x")
iex> json = ~S[ {"x": 12345} ]
iex> Libjq.run(program, json)
[12345]
The system needs to have libjq installed. On OS/X, it comes with jq:
brew install jq
On Linux, use the libjq-dev package:
apt install libjq-dev
Finally, add this to your project's mix.exs
:
def deps do
[
{:libjq, "~> 0.1.0"}
]
end