HackerTrans
TopNewTrendsCommentsPastAskShowJobs

nlohmann

no profile record

Submissions

JSON for Modern C++ 3.12.0 released

github.com
2 points·by nlohmann·el año pasado·0 comments

comments

nlohmann
·hace 2 años·discuss
It's sure not perfect (currently overworking that section), but still: https://json.nlohmann.me/integration/package_managers/
nlohmann
·hace 2 años·discuss
JSON for Modern C++ (nlohmann/json) is also accepting comments if you opt in, see https://json.nlohmann.me/features/comments/
nlohmann
·hace 2 años·discuss
Is there an example where nlohmann/json is not compliant? Would like to know (and fix) this.
nlohmann
·hace 4 años·discuss
Have you every played with SQLite virtual tables (https://sqlite.org/vtab.html) - they could allow to provide an SQLite interface while keeping the same structure on disk. Though it requires a bit of work (implementing the interface can be tedious), it can avoid the conversion in the first place.
nlohmann
·hace 5 años·discuss
It's not the "aiming at C++11", but rather "Write code that does not look odd in a code base that is using constructs from C++11, C++14, C++17, etc." - The library uses C++11 to implement an API that should not feel weird when used together with other containers from the STL.
nlohmann
·hace 5 años·discuss
I would be happy to have a different way to decide if a member variable exists or not without touching anything else.
nlohmann
·hace 5 años·discuss
The library aims at making anything related to JSON straightforward to implement. For some applications, this is a good compromise. The comment in the README is like the answer to a FAQ "How fast is it?"
nlohmann
·hace 5 años·discuss
As I tried to describe earlier: "modern C++" is not necessarily "using the latest standard", but rather "C++ since it was updated with C++11 (and later)".
nlohmann
·hace 5 años·discuss
There is also a SAX parser.

But to be honest, I have not yet played around with PMR.
nlohmann
·hace 5 años·discuss
The development started in 2013 when C++11 was still modern. Since then, the term "modern C++" is, to my understanding, a synonym for "C++11 and later". Of course, some code may look dated compared to newer C++ constructs, but the main goal is to integrate JSON into any C++ code bases without making it look odd.

The string_view lookup is nearly done, but I did not want to wait for it, because it would have delayed the release even more.

I'm also working on supporting unordered_map - using it as container for objects would be easy if we would just break the existing API - the hard part is to support it with the current (probably bad designed) template API.
nlohmann
·hace 5 años·discuss
Great to hear that you made good experiences with user-defined allocators. It would be great if you could provide a pointer to an example, because we always fall short in testing the allocator usage. So if you had a small example, you could really improve the status quo :)
nlohmann
·hace 5 años·discuss
Can you elaborate on your minuses - I don't understand what you mean with "at once" in that context.
nlohmann
·hace 7 años·discuss
Shameless self-plug: JSON for Modern C++ (https://github.com/nlohmann/json) supports CBOR along MessagePack, UBJSON, and BSON, see https://github.com/nlohmann/json#binary-formats-bson-cbor-me....