#jsmn_zig - Memory-Efficient JSON Tokenizer for Zig

1 messages · Page 1 of 1 (latest)

mint ember
#

Hello Zig community!

I’ve created jsmn_zig - a Zig port of the minimal JSMN JSON parser with significant improvements:

Key Features:

  • Hybrid memory: stack for small JSON, heap for large (auto-switch)

  • Compact tokens: 4 bytes vs 20+ in standard tokens (80% memory savings)

  • Zero-copy streaming with proper state management

-SIMD-ready optimizations for x86/ARM

Comptime-configurable for embedded use
Perfect for:

  • Embedded systems where every byte matters

  • High-performance servers needing low-latency parsing

  • Network protocol implementations

  • Configuration file parsing

GitHub: https://github.com/Ferki-git-creator/jsmn_zig

GitHub

Realization jsmn on a pure Zig. Contribute to Ferki-git-creator/jsmn_zig development by creating an account on GitHub.

fiery horizon
#

This is cool but std.json...

mint ember
# fiery horizon This is cool but std.json...

std.json is great for general use, but jsmn_zig targets specific niches:

  • 4-byte tokens vs 20+ bytes (80% memory savings)
  • Zero-copy streaming for network/data streams
  • Embedded systems where every byte counts
  • When you just need tokens, not a full AST

Different tools for different jobs 👍