What bothers me about libraries like nlohmann/json isn't so much the style or the public interface (which is fine and I actually like, too).
It's the fact that a conforming and performant JSON parsing and serialisation library doesn't require 22kloc in C++. That's madness. I also struggle to call a library "modern" that uses goto-statements.
Especially if the library is even slower than smaller alternatives like [1].
But that's just my personal opinion, I understand that other people have different priorities and are fine with including 785kb of C++ template headers as long as the public interface suits their needs and taste.
This is just an example for the kind of freedom software allows for, because it doesn't cost you anything and there is no objectively "better" in this case.
It's the fact that a conforming and performant JSON parsing and serialisation library doesn't require 22kloc in C++. That's madness. I also struggle to call a library "modern" that uses goto-statements. Especially if the library is even slower than smaller alternatives like [1].
But that's just my personal opinion, I understand that other people have different priorities and are fine with including 785kb of C++ template headers as long as the public interface suits their needs and taste.
This is just an example for the kind of freedom software allows for, because it doesn't cost you anything and there is no objectively "better" in this case.
[1] https://github.com/kazuho/picojson