So I'm trying to use JSON as a file format for my c++ project. But I cant find a library for C++17. There are a few(nlohmann/json,RapidJSON) for older versions, such as C++11 but I don't know if it's possible to use an older one. Can I do this?
So I'm trying to use JSON as a file format for my c++ project. But I cant find a library for C++17. There are a few(nlohmann/json,RapidJSON) for older versions, such as C++11 but I don't know if it's possible to use an older one. Can I do this?
C++ versions are largely backwards compatible with prior versions. Any incompatibility are (usually) done for a specific purpose and with some degree of deprecation or the like.
So broadly speaking, a C++11 library (header-only or compiled) will compile under a C++17 compiler. There are times when this will fail, but they're usually around specific library types (like std::auto_ptr or somesuch).
For compiled libraries, ABI can be an issue (which means you may need to recompile them, which requires the source code). But for header-only libraries, this isn't a problem, since you're always compiling them.