-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve JSON support #32
Comments
I agree partly - having a short dependency list might overcome maintenance cost. Writing JSON files from an associative C++ array is quite easy. The difficult part is a failsafe JSON input parser indeed. |
I would be loudly against Boost, QT, or GLib for a JSON parser. To me, Boost is one of those things you commit to or you don't - you can try to just use the headers, but you invariably end up pulling in more and more of it. QT is great for GUI apps (I use it all the time), but this isn't a GUI app (although we've talked about a wrapper) and I don't see that we should pull in all its framework just for a JSON parser. GLib...kinda the same thing; you either commit to writing a GLib application from the start or you don't, but you don't really just pull in bits of it. I've used nlohmann's parser before and it's pretty good. Its main drawback is that there's no SAX parser, which might bite us if we want to handle some sort of streaming input in an efficient manner. It is, however, pretty up-to-date. I've also used RapidJSON, but it doesn't seem to've been updated in awhile. Maybe it's just stable enough that it hasn't needed it. It is fast, though. jsoncpp also looks ok - it's pretty lightweight but not that fast and I don't know how robust it is. |
I seem to recall you stating this elsewhere (in the contributors guide, perhaps?). I totally agree. That's why I stated:
@der-stefan - Would you like to assign this issue to yourself? After this discussion, how do you feel about learning a 3rd-party library versus writing one yourself? Just keep in mind that if we write one ourselves, it should ideally someday:
|
Oh, sorry. I misinterpreted what you wrote. |
Gosh, I also had understood it the exact opposite. Sorry. It is a good idea to have a lightweight library that can be distributed along with splat. |
2.0-alpha has some example support for JSON.
nlohmann-json
orjson-cpp
.The text was updated successfully, but these errors were encountered: