And Jason? The new current JSON processor standard used in Phoenix and elsewhere that is used like poison but has near the speed of jiffy without the NIF?
Exjpet now provides its own backend to ejpet leveraging compile-time matching function generation.
e.g. (from the doc)
defmodule MyMatcher do
use Exjpet.Matcher
match ~s("nomatch"), _state do
:error
end
match ~s[{#"foo": (?<value>_)}], state do
state
|> Map.put(:node, jnode)
|> Map.put(:captures, captures)
|> Map.put(:value, value)
end
end
state = %{fooNode: nil}
Poison.decode!(~s({"foobar": 42})) |> MyMatcher.match(state)
%{fooNode: nil, captures: %{"value" => '*'}, node: %{"foobar" => 42}, value: '*'}
Thanks to Elixir macros, the module MyMatcher is fully defined at compile-time, including all sub-expression matching functions.
Feel the power of custom json matching code, without paying the price