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
Link to this function compile(var1, var2)

See :ejpet.compile/2.

Link to this function compile(var1, var2, var3)

See :ejpet.compile/3.

Link to this function compile(var1, var2, var3, var4)

See :ejpet.compile/4.

Decode string str using Poison.

Same as Exjpet.decode(str, :poison)

iex> Exjpet.decode ~s({"foo": 42})
%{"foo" => 42}
Link to this function decode(var1, var2)

See :ejpet.decode/2.

Link to this function empty_capture_set()

See :ejpet.empty_capture_set/0.

Link to this function empty_capture_set(var1)

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}"
Link to this function encode(var1, var2)

See :ejpet.encode/2.

Link to this function generator(var1)

See :ejpet.generator/1.

Link to this function get_capture(var1, var2)

See :ejpet.get_capture/2.

Link to this function get_capture(var1, var2, var3)

See :ejpet.get_capture/3.

Link to this function get_captures(var1)

See :ejpet.get_captures/1.

Link to this function get_status(var1)

See :ejpet.get_status/1.

Link to this function match(var1, var2)

See :ejpet.match/2.

Link to this function match(var1, var2, var3)

See :ejpet.match/3.

Link to this function match(var1, var2, var3, var4)

See :ejpet.match/4.

Link to this function run(var1, var2)

See :ejpet.run/2.

Link to this function run(var1, var2, var3)

See :ejpet.run/3.