Home - SmithSoft-Studios/JAZMIN GitHub Wiki

JAZMIN

JAZMIN (Javascript Secure Zipped Multi Index Notation) is a file format for lists of records: the data you would normally keep in a JSON array, a CSV file or a database export. A JAZMIN file (.jzm) is:

  • Small: compressed column by column, with names stored once. About 24× smaller than JSON and 61% smaller than gzipped JSON on the benchmark data.
  • Fast to search: built-in indexes and per-chunk statistics find matching records without loading the file. One record out of 200,000: 1.4 ms in .NET, against 265 ms with Newtonsoft.Json.
  • Encrypted when you want it: AES-256 under one key or password, every part authenticated.
  • Shareable in parts: one file, many keys, each opening only its own rows and columns, with optional expiry.
  • Convertible: to and from JSON, CSV and XML in one call, including nested JSON and XML shapes.

The same files are read and written by JavaScript/TypeScript (Node.js 22+, and browsers) and .NET 10.

import { JazminKey, open, write } from '@smithsoft-studios/jazmin';

const customers = [
  { id: 1, name: 'Ann', country: 'ZA', balance: 1520.75 },
  { id: 2, name: 'Bob', country: 'NA', balance: 99.1 },
  { id: 3, name: 'Thabo', country: 'ZA', balance: 310 },
];
const key = JazminKey.generate(); // keep key.export() in a secret manager
write('customers.jzm', customers, { indexes: { country: 'sorted' }, key });

const reader = open('customers.jzm', { key: key.export() });
for (const row of reader.find({ country: 'ZA', balance: { gt: 100 } })) console.log(row.name);
Ann
Thabo
var settings = new JazminSerializerSettings { Key = key };
new JazminSerializer(settings).Serialize("customers.jzm", customers);

using var reader = JazminReader.Open("customers.jzm", new JazminReadOptions { Key = key });
foreach (var c in reader.Query<Customer>(c => c.Country == "ZA" && c.Balance > 100m)) Console.WriteLine(c.Name);

Start here

I want to... Read
Decide whether JAZMIN fits my data Why JAZMIN
Try it in Node.js or TypeScript (5 minutes) Quick Start: JavaScript
Try it in C# (5 minutes) Quick Start: .NET
Understand chunks, statistics and indexes Core Concepts
Replace JSON files or Newtonsoft.Json Migrating from JSON and Newtonsoft

Features

Feature What it gives you Page
Schemas and types 8 column types, exact decimals, descriptions and attributes Writing Files
Queries Filters, paging, projection, counts, explain Reading and Querying, Filter Language
LINQ and the serializer JazminConvert, attributes, Query<T>, AsQueryable<T> .NET Serializer and LINQ
Encryption Keys, passwords, key rotation Encryption and Keys
One file, many keys Rows and columns per key, revocation Access Control
Masked columns Values shown as ••••4821 until a password or 2FA unlocks them Masked Columns
Expiring access Offline and online keys, unlock tokens Time-Limited Access
Records sent back Submission keys, filing services Sending Records Back
Changing files Update, upsert, delete, append, compact Updating, Appending and Compacting
Related data Several tables in one file Several Tables
Documents and attachments Embedded files, templates, PDFs, locked files Embedded Files and Documents
Browsers The viewer, the browser reader and writer Viewer and Browser
Servers Serving embedded files, rendering PDFs, async APIs Server Side
JSON, CSV, XML Import and export, files of any size Converting JSON, CSV and XML
Nested output Export shapes, JSON Schema Export Shapes
Measured performance Every benchmark, how to re-run it Performance and Benchmarks
Tuning Sort order, chunk size, priority, memory Tuning Speed and Memory
Command line jazmin CLI Command-Line Tool

Reference

Recipes · Errors and Troubleshooting · FAQ · Versions and Compatibility · Security Model · Format Overview · Glossary

Packages

Platform Package Install
Node.js 22+, TypeScript, browsers @smithsoft-studios/jazmin npm install @smithsoft-studios/jazmin
.NET 10 Jazmin dotnet add package Jazmin
ASP.NET Core 10 Jazmin.AspNetCore (New in 1.2) dotnet add package Jazmin.AspNetCore

Every runnable example in this wiki is checked against the libraries with tools/check-examples.mjs: the output shown under an example is what it prints.

⚠️ **GitHub.com Fallback** ⚠️