explaingit

saleyn/glazer

Analysis updated 2026-05-18

16C++Audience · developerComplexity · 2/5Setup · moderate

TLDR

Glazer is a fast C++ powered Erlang and Elixir library that converts data between JSON, YAML, CSV, and native Erlang structures, outperforming pure-Erlang alternatives.

Mindmap

mindmap
  root((glazer))
    What it does
      JSON YAML CSV codec
      Erlang native structures
      NIF C++ backend
      Streaming decode
    Tech stack
      Erlang
      Elixir
      C++
    Use cases
      Fast JSON parsing
      YAML conversion
      CSV processing
      jq style queries
    Not supported
      XML

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Parse and generate JSON, YAML, or CSV data in an Erlang or Elixir application with high performance.

USE CASE 2

Stream-decode large JSON or CSV feeds without loading the entire input into memory first.

USE CASE 3

Query and extract values from JSON documents using jq-style filter syntax.

USE CASE 4

Replace a slower pure-Erlang parsing library in a system where encoding and decoding speed matters.

What is it built with?

ErlangElixirC++

How does it compare?

saleyn/glazerneo773/d9mtwidberg/xlive-research
Stars161616
LanguageC++C++C++
Setup difficultymoderatehardhard
Complexity2/55/55/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a C++ toolchain to compile the NIF during installation.

In plain English

Glazer is a library for Erlang and Elixir applications that converts data between three common text formats, JSON, YAML, and CSV, and native Erlang data structures. Erlang is a programming language used in systems that need high reliability and concurrency. JSON, YAML, and CSV are all ways of storing or transmitting structured data as plain text. Glazer reads those text formats and turns them into Erlang values your code can work with, and it also goes the other direction, turning Erlang values back into those text formats. The library is written in C++ and connects to Erlang through a mechanism called a NIF (native implemented function), which lets Erlang code call compiled C++ code directly for maximum speed. According to the benchmarks in the README, it is faster than every other library tested for JSON encoding and decoding, running about 25 to 40 percent ahead of the next fastest option. For YAML it is 2 to 7 times faster than comparable libraries. For CSV it is 4 to 12 times faster than common alternatives, with some pure-Erlang CSV libraries timing out entirely on large files. For JSON, the library supports reading and writing all standard JSON value types: objects, arrays, strings, numbers including very large integers, booleans, and null. It also supports streaming decoding, which lets you process data as it arrives rather than waiting for a complete input, useful for things like a continuous feed of JSON records over a network. There is optional support for jq filter queries, which lets you search and extract values from a JSON document using a well-known path syntax. A simpler path lookup function is also included and works without the jq dependency. YAML support covers reading YAML documents into Erlang maps, lists, and scalar values, and writing Erlang terms back to YAML block-style output. CSV support handles the standard RFC 4180 format, with options for header rows and field type conversion, plus the same streaming approach available for JSON. XML is intentionally not supported. The README explains that XML's data model does not map cleanly onto Erlang's native structures, and Erlang's standard library already includes an XML parser. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
Show me how to use Glazer to decode a JSON string into an Erlang map and re-encode it.
Prompt 2
How do I use Glazer's streaming decoder to process a continuous feed of JSON records?
Prompt 3
Write example Elixir code that reads a CSV file into structured data using Glazer.
Prompt 4
Explain how Glazer's jq-style path queries work for extracting values from JSON.

Frequently asked questions

What is glazer?

Glazer is a fast C++ powered Erlang and Elixir library that converts data between JSON, YAML, CSV, and native Erlang structures, outperforming pure-Erlang alternatives.

What language is glazer written in?

Mainly C++. The stack also includes Erlang, Elixir, C++.

How hard is glazer to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is glazer for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.