rjs icon indicating copy to clipboard operation
rjs copied to clipboard

safe & fast JSON library for Erlang, powered by Rust

rjs

install

On rebar.config, add

{deps, [
    {rjs, {git, "https://github.com/yjh0502/rjs", {branch, "master"}}}
]}.

usage

decode/1,2

decode(JSON) -> Result
decode(JSON, Opts) -> Result

  JSON = binary() | iolist()
  Result = {ok, term()}
  Opts = [binary | atom | existing_atom | attempt_atom]

See jsx:decode/1,2

encode/1

encode(Term) -> Result

  Term = term()
  Result = {ok, binary()}

benchmark

encoding performance, normalized

bench encode

decoding performance, normalized

bench decode