Click here to Skip to main content
15,437,163 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Please Note: I've never used JSON before, have minimum experience with Windows Sub Linux, and am still probably considered a beginner in C++. I've taken two C++ courses at my university and am working on a project in my free time, which I need a JSON parser for so I can read from many JSON files and store the data into my program.

I'm following this tutorial:
Accessing JSON Data with C++[^]

I've successfully built the program in:
build/debug
like it says to do for #1.

Now to use the program in my own C++ project, am I supposed to put the build folder into my project's directory? Then #include <...> in my code? I'm confused because the tutorial says:
the top-level JsonCpp folder contains a directory named include that contains header files such as json/json.h and json/writer.h. These are needed to compile C++ applications that access JsonCpp routines.
but I don't see json.h or writer.h in the file path it mentions:
https://gyazo.com/96f1ddfebef0eeaff94a9b8254d35a4f[^]

Help would be greatly appreciated, thanks!

What I have tried:

Building the program, deleting it and rebuilding it (In Windows Sub-Linux using Ubuntu).
Posted
Updated 30-May-19 20:43pm
Comments
Patrice T 30-May-19 21:01pm     CRLF
There is a forum on bottom of article. This is the best place to contact the author of article.
PiggiesGoSqueal 3-Jun-19 18:45pm    
Oh I didn't see your comment until now, thanks. Will check that out for future reference.

1 solution

I guess the path
jsoncpp-master\build\debug\include\json
wherein you are looking for the headers json.h, and writer.h is wrong.

I (again) guess they are in the
jsoncpp-master\include\json
folder.

See jsoncpp/include/json at master · open-source-parsers/jsoncpp · GitHub[^].
 
Share this answer
 
Comments
PiggiesGoSqueal 3-Jun-19 13:31pm    
Apologies for late reply. Thank you very much, that was very helpful.
CPallini 4-Jun-19 15:58pm    
You are welcome.
[no name] 18-Jun-19 10:54am    
thanks!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900