Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Elixir
  3. jason

jason

NOASSERTIONElixirv1.4.0

A blazing fast JSON parser and generator implemented in pure Elixir.

GitHubGitHub
1.7k stars178 forks0 contributors

What is jason?

Jason is a high-performance JSON parsing and generation library written in pure Elixir. It solves the need for fast, reliable JSON handling in Elixir applications, offering significant speed improvements over existing alternatives while maintaining strict compliance with JSON standards. The library is designed as a drop-in replacement for libraries like Poison, with better performance and more rigorous specification adherence.

Target Audience

Elixir developers building web APIs, data processing pipelines, or any application requiring efficient JSON serialization/deserialization. It's particularly valuable for projects using Phoenix, Ecto, Absinthe, or Postgrex where JSON performance is critical.

Value Proposition

Developers choose Jason for its exceptional performance (often 2x faster than pure-Elixir alternatives), strict standards compliance, and seamless integration with major Elixir ecosystems like Phoenix and Ecto. Its pure-Elixir implementation avoids NIF-related safety concerns while delivering performance comparable to C-based solutions.

Overview

A blazing fast JSON parser and generator in pure Elixir.

Use Cases

Best For

  • High-throughput JSON APIs in Phoenix applications
  • Ecto projects requiring efficient JSON field serialization
  • Replacing Poison in existing Elixir codebases for performance gains
  • Data processing pipelines handling large JSON datasets
  • Absinthe GraphQL implementations needing optimized JSON encoding
  • Postgrex database integrations with JSONB columns

Not Ideal For

  • Projects needing automatic encoding of arbitrary structs without explicit protocol definitions
  • Teams relying on Poison's `as:` option for decoding JSON into specific data structures
  • Environments that depend on lax JSON parsing (e.g., allowing unescaped newlines) for compatibility

Pros & Cons

Pros

Blazing Fast Performance

Benchmarks show it's at least twice as fast as pure Elixir libraries like Poison and comparable to C-based NIF implementations such as jiffy, making it ideal for high-throughput applications.

Strict Standards Compliance

Fully conforms to RFC 8259 and ECMA 404, validated with JSONTestSuite, ensuring reliable and spec-compliant JSON parsing and generation without edge-case errors.

Pure Elixir Safety

Written entirely in Elixir with no external NIF dependencies, avoiding potential crashes and compatibility issues across Erlang/OTP versions.

Protocol-Driven Encoding

Requires explicit implementation of the `Jason.Encoder` protocol for structs, promoting intentional serialization and preventing accidental data leakage.

JSON Fragment Optimization

Supports `Jason.Fragment` for injecting pre-encoded JSON, eliminating unnecessary decode/encode roundtrips and improving performance in caching or database integration scenarios.

Cons

Explicit Encoder Boilerplate

Unlike Poison, Jason does not automatically encode arbitrary structs; each requires manual `Jason.Encoder` implementation, adding development overhead for dynamic or legacy codebases.

Limited Built-in Encoders

Missing out-of-the-box encoders for common Elixir types like `MapSet`, `Range`, and `Stream`, forcing custom implementations that can be error-prone.

No Decoding into Data Structures

Lacks Poison's `as:` option for decoding JSON into specific structs or shapes, requiring additional manual mapping steps that complicate data handling.

Stricter Parsing Can Break Compatibility

Adheres rigidly to JSON standards, rejecting non-compliant inputs like unescaped newlines, which might disrupt integrations with systems using more lenient libraries.

Open Source Alternative To

jason is an open-source alternative to the following products:

P
Poison

Poison is an Elixir library that provides a fast, pure Elixir JSON parser and generator, commonly used for encoding and decoding JSON data in Elixir applications.

j
jiffy

jiffy is a JSON Web Token library for Elixir that provides a simple API for encoding and decoding JWT tokens with support for various algorithms.

Frequently Asked Questions

Quick Stats

Stars1,680
Forks178
Contributors0
Open Issues13
Last commit4 months ago
CreatedSince 2017

Tags

#elixir#json-generator#ecto-integration#data-interchange#api-development#serialization#elixir-library#backend#json#json-parser#performance

Built With

E
Elixir

Included in

Elixir13.1k
Auto-fetched 12 hours ago

Related Projects

poisonpoison

An incredibly fast, pure Elixir JSON library

Stars2,032
Forks214
Last commit2 years ago
jokenjoken

Elixir JWT library

Stars815
Forks105
Last commit10 days ago
jsxjsx

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

Stars696
Forks215
Last commit2 years ago
ja_serializerja_serializer

JSONAPI.org Serialization in Elixir.

Stars638
Forks143
Last commit5 months 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