Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Erlang
  3. jiffy

jiffy

NOASSERTIONC2.0.1

A high-performance JSON parser and encoder for Erlang implemented as a NIF.

GitHubGitHub
875 stars321 forks0 contributors

What is jiffy?

Jiffy is a JSON parser and encoder for Erlang implemented as a Natively Implemented Function (NIF). It solves the need for high-performance JSON handling in Erlang applications by providing a fast, efficient library that converts between JSON and Erlang data types without nesting limits or constraints on the parsed JSON.

Target Audience

Erlang developers who need to parse or generate JSON in performance-sensitive applications, such as web services, APIs, or data processing pipelines.

Value Proposition

Developers choose Jiffy for its speed (as a NIF), simplicity, and robust handling of JSON-to-Erlang mapping with configurable options like map support, null term replacement, and memory control.

Overview

JSON NIFs for Erlang

Use Cases

Best For

  • High-throughput JSON parsing in Erlang web servers
  • Encoding Erlang terms to JSON for API responses
  • Handling UTF-8 JSON data in binaries exclusively
  • Applications needing configurable null value representation
  • Scenarios requiring map data type support for JSON objects
  • Parsing JSON without depth limitations

Not Ideal For

  • Projects requiring JSON data in non-UTF-8 encodings
  • Applications with hard real-time constraints where NIF crashes could destabilize the Erlang VM
  • Teams preferring pure Erlang solutions to avoid NIF-related risks and scheduler blocking
  • Environments running older Erlang VMs (pre-17.0) without maps support

Pros & Cons

Pros

High Performance NIF

Implemented as a hand-crafted state machine NIF, it maximizes speed and efficiency for JSON parsing and encoding, making it ideal for performance-sensitive Erlang applications.

Flexible Data Mapping

Supports conversion between JSON and Erlang terms like tuples, lists, binaries, and maps with options such as return_maps and null_term replacement, offering versatile integration.

No Nesting Limits

Imposes no constraints on JSON nesting depth, allowing it to handle deep or complex JSON structures without the limitations of earlier implementations.

Configurable Memory Control

Options like copy_strings and dedupe_keys provide fine-grained control over memory usage and key handling, adapting to different workload needs.

Cons

NIF Stability Risks

As a NIF, bugs in Jiffy can crash the entire Erlang VM, posing a significant stability risk compared to pure Erlang JSON libraries.

UTF-8 Exclusive

Only handles UTF-8 binaries, requiring additional preprocessing for JSON data in other encodings, which can add overhead in heterogeneous environments.

Limited Backward Compatibility

Features like return_maps depend on Erlang VM support from version 17.0 onward, making it less suitable for legacy systems without upgrades.

Frequently Asked Questions

Quick Stats

Stars875
Forks321
Contributors0
Open Issues0
Last commit5 days ago
CreatedSince 2011

Tags

#json-encoder#data-serialization#erlang-nif#erlang-library#utf-8#json-parser#parser#performance

Built With

E
Erlang
N
NIF

Included in

Erlang1.7k
Auto-fetched 1 day ago

Related Projects

jsxjsx

an erlang application for consuming, producing and manipulating json. inspired by yajl

Stars699
Forks215
Last commit2 years ago
eqleql

Erlang with SQL or not

Stars117
Forks17
Last commit2 years ago
rec2jsonrec2json

Compile erlang record definitions into modules to convert them to/from json easily.

Stars45
Forks21
Last commit1 year ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub