Jazmin 1.6.2
dotnet add package Jazmin --version 1.6.2
NuGet\Install-Package Jazmin -Version 1.6.2
<PackageReference Include="Jazmin" Version="1.6.2" />
<PackageVersion Include="Jazmin" Version="1.6.2" />
<PackageReference Include="Jazmin" />
paket add Jazmin --version 1.6.2
#r "nuget: Jazmin, 1.6.2"
#:package Jazmin@1.6.2
#addin nuget:?package=Jazmin&version=1.6.2
#tool nuget:?package=Jazmin&version=1.6.2
Jazmin
JAZMIN is a compact, indexed, optionally encrypted file format for lists of records. This is the library for
.NET 10, shaped like Newtonsoft.Json and with no third-party dependencies. It reads and writes the same files as the
JavaScript library (npm: @smithsoft-studios/jazmin).
dotnet add package Jazmin
using Jazmin;
using Jazmin.Serialization;
// One-liners, like Newtonsoft.Json
var key = JazminKey.Generate(); // store it safely, e.g. in a secrets vault
byte[] bytes = JazminConvert.SerializeObject(customers, new() { Key = key });
List<Customer> back = JazminConvert.DeserializeObject<List<Customer>>(bytes, new() { Key = key })!;
// Query a file: only the index pages and the chunks holding matches are read
using var reader = JazminReader.Open("customers.jzm", new() { Key = key });
var za = reader.Query<Customer>(c => c.Country == "ZA" && c.Name.Contains("Smith")).ToList();
// Or a whole LINQ query run by the reader: the condition, Skip/Take and Count read only what they need
var page = reader.AsQueryable<Customer>().Where(c => c.Country == "ZA").Skip(20).Take(10).ToList();
What it does
- Small files: about 24× smaller than JSON, and 61% smaller than gzipped JSON.
- Fast lookups with little memory: a query reads the index and the matching chunks, not the whole file.
- Encryption: AES-256-GCM on every section, with tamper detection.
- Access control: one file, many keys. Each access key sees only its rows and columns, and keys can expire.
- Several tables per file, embedded files, and append-only updates.
- Lists and classes as nested columns (opt-in
NestedColumns, or[JazminNested]per property): stored as columns of their fields, smaller and faster to read than JSON text; LINQ reads only the fields a query uses. - Records sent back: people with an access key send records back in small files locked with their submission
key, which only someone who opened the shared file has.
JazminFile.FileSubmissionchecks and files them: the sender's grant and expiry, their own rows only, records sent again, attached files checked by their first bytes. - Is compacting worth it?
reader.Storage()reports the bytes in use and no longer used, deleted rows still stored, and each index's segments, reading only the file's directories. - Change a file you already have, in one rewrite that keeps the rest (
JazminFile.Update):IndexesandSortedBychange indexes and the sort order;AddTables,RenameTables,RemoveTableschange its tables;Linksdeclares how tables refer to each other, andreader.CheckLinks()checks them against the rows;Set+Where, andTables(JazminTableChanges) for the others, change rows in several tables at once. - Which versions read a file:
reader.ReaderFeatureslists the features a file needs (empty for every 1.x). - Editable documents:
JazminFile.WriteChangesandApplyChangesmake and apply the change files a document's readers send, with conflicts held for the owner. - Newtonsoft-style serializer: attributes, converters, naming strategies, default values, polymorphism and references.
- LINQ the reader runs:
AsQueryable<T>()turns conditions,Skip/Take, counts and sort order into one query on the file, reading only the columns it uses. - Export shapes saved in the file:
JazminWriteOptions.Shapes, thenJazminShape.FromFile(reader, "Totals"); in a shared file each key sees only the shapes it can use. - Memory or speed first, key and password changes without rewriting rows, and rows as a JSON stream.
- ASP.NET Core: the
Jazmin.AspNetCorepackage serves a file's embedded files from an endpoint.
Full documentation, the format specification and the JavaScript library: github.com/SmithSoft-Studios/JAZMIN.
MIT licence. JAZMIN™ is a trademark of SmithSoft Pty Ltd. The MIT licence covers the code, not the name: please don't call another product or service JAZMIN, or use the JAZMIN logo for one.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Jazmin:
| Package | Downloads |
|---|---|
|
Jazmin.AspNetCore
ASP.NET Core endpoints for JAZMIN (.jzm) files: MapJazminFiles serves a file's embedded files (invoices, photos, videos) per key, with byte ranges, ETags and a sandbox for stored pages. |
GitHub repositories
This package is not used by any popular GitHub repositories.