A simple C++ JSON parser that reads and parses JSON data from a file, supporting basic JSON types such as objects, arrays, strings, numbers, booleans, and null values. This parser is a really simple one, as I needed it for my webserver.
- Parses JSON objects, arrays, strings, numbers, booleans, and null values.
- Outputs parsed JSON in a readable format.
- Handles white spaces and various JSON structures.
- Basic error handling for malformed JSON.
- C++ compiler supporting C++11 or later (e.g., GCC, Clang, MSVC).
- Make sure you have
g++installed if you're using GCC.
Clone the repository and navigate to the project directory:
git clone https://github.com/yourusername/json-parser.git
cd json-parserTo compile the project, run the provided build script or use the following command:
./build.shAlternatively, you can compile it manually using:
g++ -std=c++11 -o json_parser src/*.cppIf you want to use it, just include the .cpp and .h files in your project, even though I wouldn't recommend using it. It was a just for fun project for my webserver. If you are wondering you the parser can be used in the main.cpp is an example.