exjpet v0.1.0 Exjpet
Documentation for Exjpet.
Examples
iex> epm = Exjpet.compile("[1, *, (?<cap>{})]")
iex> json = Exjpet.decode(~s([1, 2, {"a": 42}]), :poison)
iex> Exjpet.run(json, epm)
{true, %{"cap" => [%{"a" => 42}]}}
Link to this section Summary
Functions
See :ejpet.backend/1
Compile expr
with Poison
as JSON codec
See :ejpet.compile/2
See :ejpet.compile/3
See :ejpet.compile/4
Decode string str
using Poison
See :ejpet.decode/2
See :ejpet.empty_capture_set/0
See :ejpet.empty_capture_set/1
Encode JSON document json
using Poison
See :ejpet.encode/2
See :ejpet.generator/1
See :ejpet.get_capture/2
See :ejpet.get_capture/3
See :ejpet.get_captures/1
See :ejpet.get_status/1
See :ejpet.match/2
See :ejpet.match/3
See :ejpet.match/4
See :ejpet.run/2
See :ejpet.run/3
Link to this section Functions
See :ejpet.backend/1
.
Compile expr
with Poison
as JSON codec.
Same as Exjpet.compile(expr, :poison)
iex> epm = Exjpet.compile "[*]"
iex> Exjpet.backend epm
:poison
See :ejpet.compile/2
.
See :ejpet.compile/3
.
See :ejpet.compile/4
.
Decode string str
using Poison
.
Same as Exjpet.decode(str, :poison)
iex> Exjpet.decode ~s({"foo": 42})
%{"foo" => 42}
See :ejpet.decode/2
.
See :ejpet.empty_capture_set/0
.
See :ejpet.empty_capture_set/1
.
Encode JSON document json
using Poison
.
Same as Exjpet.encode(json, :poison)
iex> Exjpet.encode %{foo: 42 }
"{\"foo\":42}"
See :ejpet.encode/2
.
See :ejpet.generator/1
.
See :ejpet.get_capture/2
.
See :ejpet.get_capture/3
.
See :ejpet.get_captures/1
.
See :ejpet.get_status/1
.
See :ejpet.match/2
.
See :ejpet.match/3
.
See :ejpet.match/4
.
See :ejpet.run/2
.
See :ejpet.run/3
.