Hacker News new | ask | show | jobs
by rowanG077 1594 days ago
They are single header for a single reason: Dead easy to distribute.

> You can have perfectly readable code in a single file that is 1000s loc.

You can if you are dealing with a single concept. JSON parsing is not a single concept. You can easily split that up into more understandable modules. In fact I would wager that any JSON library that has not modularised serialization, deserialization and object building/modification into modules is not doing a good job.

It's not like more c files cost anything. It's not comparable to header-only libs since they will compile to an object file anyway.