There's a bunch of simplistic JSON parsers. I felt the need to write something similar for protobuf, so here's https://github.com/pkhuong/ppb
The basic idea is you predeclare all the fields you're interested in (including catch-all fields, as an option), prescan to gather stats like number of occurrence and total number of bytes, for each field (just enough to preallocate), then lex the same bytes again to get individual field info, in order.

