News for hackers. Stuff that matters.
Re:CJSON – Ultralightweight JSON parser in ANSI C by rowanG077 on Sunday February 13, 2022 @06:52PM (#30326860)
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.

There are no comments on this comment yet.