A high-performance, standards-compliant JSON library for Elixir, built for speed and correctness.
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.
Elixir developers who need high-performance JSON encoding and decoding, particularly those building web services, APIs, or applications where JSON processing speed is critical.
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.
An incredibly fast, pure Elixir JSON library
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.
Fully conforms to RFC 8259 and ECMA 404, and passes the JSONTestSuite, ensuring correctness and reliability in JSON handling.
Encoder, decoder, and parser components are usable independently, allowing developers to integrate only what they need for specific tasks.
Provides derivable protocols for encoding Elixir structs with options like :only or :except for attribute selection, simplifying API response generation.
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.
Enabling strict key validation to prevent duplicate keys causes a small performance penalty, which can impact high-throughput scenarios.
The README does not mention support for streaming JSON or incremental parsing, limiting its use for large file handling without custom workarounds.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.