Comment

Comment by jlarocco

This uses std::string all over the place, which allocates memory under the hood.

I'm not sure how any JSON parser could avoid memory allocation without a difficult to use interface. Numbers, arrays, strings, and objects are unbounded by the JSON spec, so a truly malloc free library would need to provide a kind of streaming interfaces where things are returned in fixed sized chunks.

JSON wouldn't be my first choice for data storage in situations where I needed to avoid dynamic memory.

parent jlarocco 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton