> "If your JSON parser needs recursion, you're doing it wrong."
## Overview
**fast_json** is a production-grade, high-performance JSON library for MQL5, designed for high-frequency trading (HFT) environments where latency and memory fragmentation are critical.
Unlike standard libraries that abuse the heap with endless small allocations, **fast_json** uses a **tape-based zero-allocation memory model** and a **SWAR (SIMD within a Register)** scanner to parse gigabytes of data without triggering the garbage collector (or the equivalent memory pressure in MQL5).
## Key Features
- **🚀 Zero-Alloc Tape Architecture**: Parses the entire JSON into a single contiguous integer array (the "tape"). No objects are created during parsing.
- **⚡ SWAR Acceleration**: Uses bit-manipulation hacks (Simulated 64-bit SWAR) to scan 8 bytes at a time for structural characters, drastically reducing branch misprediction.
- **🛡️ Stack-Safe Iterative Parser**: Written as a finite state machine. Zero recursion. Immune to stack overflow attacks from deeply nested JSONs.
- **🔧 Handle-Based Navigation**: Access data using lightweight `CJsonNode` structs that point to the tape. Copying nodes is free.
- **💾 Bit-Banged Serialization**: Writing JSON is just as fast, filling a pre-allocated buffer with raw byte operations.
## Performance
| Metric | fast_json | Standard Libs |
|--------|-----------|---------------|
| **Allocation Strategy** | 1 big block (Tape) | N objects per node |