Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup json library in c++? (Microsoft Visual Studio) [closed]

Tags:

c++

json

I have downloaded the nlohmann library in a zip format and I need to understand where to unzip it. I know it's a header only library. Do I unzip it under

/usr/include or /usr/include/c++/8

So the directory will look like:

/usr/include/nholmann/include or /usr/include/c++/8/nholmann/include

like image 426
Chin Yong Avatar asked Nov 02 '25 17:11

Chin Yong


1 Answers

So there are many JSON libraries out there. I would recommend you to use this one (requries C++11):

https://github.com/nlohmann/json

It is header only so no installation is requried. It has MIT Licences which is good even for commercial use. Also it is widely used so if you have any trouble it will be easy to find some resources on internet. On stackoverflow look for tag nlohmann-json

To use it you would have to add #include <nlohmann/json.hpp> For more info check github integration

like image 146
wdudzik Avatar answered Nov 04 '25 08:11

wdudzik