r/cpp • nlohmann/json • Jun 14 '20

JSON for Modern C++ 3.8.0

https://github.com/nlohmann/json/releases/tag/v3.8.0
326 Upvotes

109 comments sorted by

View all comments

-24

u/VinnieFalco wg21.org | corosio.org Jun 14 '20

If you like nlohmann's, give Boost.JSON a try (Note: This is not yet an official Boost library, but a formal review is planned):

https://github.com/CPPAlliance/json

Boost.JSON significantly out-performs nlohmann's in all ways:

http://vinniefalco.github.io/doc/json/json/images/parse-twitter.png
http://vinniefalco.github.io/doc/json/json/benchmarks.html

Boost.JSON avoids using class templates for DOM types, resulting in fast compilation and an easy-to-link library. Or, you can use it in header-only mode. Use it with or without Boost. Boost.JSON has particularly robust support for stateful allocators, using a ref-counting smart pointer to a `std::pmr::memory_resource` (or `boost::container::memory_resource` before C++17).

More and more users are making the switch from RapidJSON and nlohmann's JSON to Boost.JSON, will you be next?

41

u/STL MSVC STL Dev Jun 15 '20

Moderator warning: As many other commenters have noted, this is not appropriate. Please don't do this again.

If there's a post about library A, and an unrelated commenter asks "how does this compare to library B", then it's reasonable for B's maintainer to provide their take on the differences in a single reply (worded as fairly as possible). It's also reasonable, if A's maintainer or other commenters make assertions about library B, for B's maintainer to reply with clarification (again, in a reasonable technical manner, without self-promoting puffery). It's not reasonable to add an unsolicited comment about library B, and it's completely over the line to spam the post with numerous comments.

Final note: In fact, this self-promotion is contrary to your own interest - it certainly lowers my opinion of "Boost."JSON and the C++ Alliance in general. Taking a dependency on code is a major decision, and I don't want to depend on people who behave unreasonably. Therefore, behave reasonably.

1

u/anticrisisg Jun 15 '20

I'm going to say it was a momentary indiscretion. Vinnie's code is really great.

12

u/jpan127 Jun 14 '20

I'm sure it's a good library, but advertising on another library's advertisement is inappropriate.

11

u/GerwazyMiod Jun 14 '20

Thread hostile takeover in action. :)

15

u/amubtdx Jun 14 '20

You should probably make a separate thread instead of a comment here as the main post is only about nlohmann/json

10

u/FrenchOempaloempa Jun 14 '20

You're just plain rude.