finds.dev← search

// the find

bblanchon/ArduinoJson

★ 7,191 · C++ · MIT · updated Jul 2026

📟 JSON library for Arduino and embedded C++. Simple and efficient.

ArduinoJson is a header-only C++ JSON (and MessagePack) library built specifically for microcontrollers, where heap fragmentation and stack size matter. It uses a pool allocator inside JsonDocument to avoid dynamic allocation scatter, making it predictable on constrained hardware. Anyone doing IoT work in C++ who needs to parse or build JSON without blowing their stack should use this.

The pool allocator design is the right call for embedded — you pre-size the document and it carves from that block, so you get deterministic memory behavior instead of malloc surprises at 2am. String deduplication in the pool is a nice touch that actually matters when you're deserializing objects with repeated keys on a device with 32KB RAM. The filter API lets you deserialize only the fields you care about, which saves both parse time and memory on large API responses. The OSS-Fuzz integration and near-100% test coverage across GCC 4.8 through 12 and Clang 5 through 19 is genuinely serious for a library at this level.

JsonDocument sizing is a footgun — you have to guess how much memory the document needs upfront, and if you get it wrong the document silently truncates (the overflowed() method exists but you have to remember to call it). There's no streaming deserializer that processes tokens incrementally; you must buffer the entire input first, which is a problem if you're pulling a 10KB payload off a slow UART. The v7 upgrade from v6 broke a lot of user code by removing the size template parameter from StaticJsonDocument — there's a deprecated compatibility shim, but anyone with a large existing codebase got a non-trivial migration. MessagePack support exists but the docs treat it as secondary, and there's no schema validation or type-safe accessor pattern beyond manually calling as<T>() and hoping.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →