JSONW
Tiny RFC 8259-compliant JSON parser for C 2025-01-14
Project Readme • Project Files • GitHub Repo • jsonw.c
JSONW is a library for walking JSON texts and extracting values from them. It’s the next level up for when strchr
ing your way around JSON becomes a little too pragmatic. Its features and design are discussed briefly in the readme.
JSONW is the culmination of five hours on the train writing a JSON parser in the most obvious way. What I didn’t expect is I couldn’t find anyone who’s written a JSON parser similar in design. There’s the parsers that build and store an internal representation on the heap, but often that’s overkill. There’s the parsers that return string slices into the original JSON text, but you’re expected to parse numbers and unescape string literals yourself. It’s surprising there’s nothing out there with the same value proposition as JSONW’s.