PJSON is a slim, and easy to use JSON interpreter for the C++ language.
More information aswell as a complete documentation is located at the github pages.
The full documentation along with tutorials and examples can be found here:
-
boost (only headers required; variant and lexical_cast)
If you’re on a debian derivative (debian, ubuntu, ..) you can use the following to get the prerequisites (as root):
# apt-get install libtool libboost-all-dev
Installation should be as easy as 1-2-3: (if you grabbed the source, you need to run autogen.sh to generate the configure file.)
# ./configure
# make
# make install
Step 3 must be run as root (unless your user have write permissions in $prefix), while step 1 and 2 do not require this.
There are several JSON interpreters/parsers out there, why would I go about creating my own one? Several reasons:
-
As an initial project, I did it to learn the basics of C++ and the boost library.
-
The existing JSON interpreters had flaws I decided I could not accept. Among others were loads of valgrind warings, memory leaks and difficult to learn API.