Skip to content

This is a c++ project which parses through Json file to get each element

License

Notifications You must be signed in to change notification settings

amyJin/JSonParser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The program JSonObjParser.cc takes a JSON file as input and changes it into a JSON object. The program JSonObj.cc provides methods to interact with the JSON object to get the specific values and vectors. 

We are using boost_1_44_0.

To use this JSON parser you will need to have the g++ and boost_1_44_0 installed on your system.

building system:

mkdir build   /** create a build directory */
cd build
cmake ..      /** prepration for make */ 
make          /** build the system */
make install  /** create install directory */

The source code is at install/src.

The test code is at install/example.


The ingredients are:
	
	JSonObjParser.h		(a header file that will be included in your program)
	JSonObjParser.cc	(actual parsing source code)
	JSonObj.h		(header file that will be included in your program)
	JSonObj.cc		(three functions:
					T getValue<T>(keyName);
					std::vector<T> getVector<T>(keyName);			
					std::string getType(keyName);
				)



Sample command of compilation:

g++ yourFile.cc -I/(location of install dir)/install/include/ -L/(location of install dir)/install/lib/ -ljsoncpp

About

This is a c++ project which parses through Json file to get each element

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published