Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Elixir
  3. poison

poison

0BSDElixir

A high-performance, standards-compliant JSON library for Elixir, built for speed and correctness.

GitHubGitHub
2.0k stars213 forks0 contributors

What is poison?

Poison is a pure Elixir JSON library designed to deliver exceptional performance while maintaining simplicity, completeness, and strict adherence to standards. It achieves its speed through optimized techniques like sub binary matching, a hand-rolled parser, and IO list encoding, making it one of the fastest JSON libraries available for the Elixir ecosystem.

Target Audience

Elixir developers who need high-performance JSON encoding and decoding, particularly those building web services, APIs, or applications where JSON processing speed is critical.

Value Proposition

Developers choose Poison for its combination of being one of the fastest JSON libraries for Elixir, full standards compliance, and modular design that allows independent use of encoder, decoder, and parser components.

Overview

An incredibly fast, pure Elixir JSON library

Use Cases

Best For

  • High-performance JSON processing in Elixir web applications and APIs.
  • Ensuring strict JSON standards compliance (RFC 8259, ECMA 404) in Elixir projects.
  • Encoding Elixir structs to JSON with customizable attribute selection or exclusion.
  • Preventing duplicate keys in JSON objects with optional strict key validation.
  • Parsing JSON without decoding, using the standalone parser for maximum speed.
  • Benchmarking and comparing JSON library performance in the Elixir ecosystem.

Not Ideal For

  • Projects requiring JSON streaming or incremental parsing for large datasets
  • Teams that prioritize NIF-based libraries for absolute maximum speed over pure Elixir safety
  • Applications where JSON processing is minimal and a simpler, less optimized dependency is sufficient
  • Environments with strict memory constraints, due to risks of unbounded atom creation with key parsing

Pros & Cons

Pros

Blazing Fast Performance

Uses sub binary matching, a hand-rolled parser optimized for BeamAsm JIT, and IO list encoding, making it one of the fastest Elixir JSON libraries, with benchmarks close to jiffy.

Strict Standards Compliance

Fully conforms to RFC 8259 and ECMA 404, and passes the JSONTestSuite, ensuring correctness and reliability in JSON handling.

Flexible Modular Design

Encoder, decoder, and parser components are usable independently, allowing developers to integrate only what they need for specific tasks.

Easy Struct Encoding

Provides derivable protocols for encoding Elixir structs with options like :only or :except for attribute selection, simplifying API response generation.

Cons

Atom Memory Management Risks

Using keys: :atoms for parsing creates atoms that are not garbage-collected, risking VM crashes if atom limits are exceeded, as warned in the README.

Performance Hit with Validation

Enabling strict key validation to prevent duplicate keys causes a small performance penalty, which can impact high-throughput scenarios.

No Built-in Streaming Support

The README does not mention support for streaming JSON or incremental parsing, limiting its use for large file handling without custom workarounds.

Frequently Asked Questions

Quick Stats

Stars2,033
Forks213
Contributors0
Open Issues26
Last commit1 year ago
CreatedSince 2014

Tags

#encoder#elixir#data-serialization#beam-vm#json-library#json-parsing#json#json-parser#parser#standards-compliant#performance

Built With

E
Erlang
E
Elixir

Included in

Elixir13.1k
Auto-fetched 1 day ago

Related Projects

jasonjason

A blazing fast JSON parser and generator in pure Elixir.

Stars1,675
Forks176
Last commit1 month 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