JSON encoder and decoder for Erlang, written as a NIF, that puts correctness first
open sourceMIT AND (Apache-2.0 OR BSL-1.0)free
Jiffy is a JSON library for Erlang implemented as a NIF in C. It puts correctness over raw speed: it isn't the fastest JSON library in standard benchmarks, but it tries to be fast while affecting total system performance as little as possible, with options for how many bytes it processes per reduction. jiffy:decode can return maps, map null to a chosen term, dedupe keys, limit nesting depth and decode several terms from one binary; jiffy:encode can pretty-print, escape to 7-bit output, fix broken UTF-8 and escape forward slashes. It only understands UTF-8, and errors are raised as exceptions.
Problems it solves
- encode and decode JSON in an Erlang app
- parse JSON into Erlang maps
- pretty-print JSON from Erlang
Features
- C NIF encoder and decoder
- decode to maps, custom null terms and deduplicated keys
- max_depth and trailer decoding for several terms in one binary
- pretty-printed and 7-bit escaped output
- controls how much work runs per reduction to limit scheduler impact
Limitations
Alternatives
The same job
These do what Jiffy does.
