The JSON Parser Library is a โก fast and versatile C++ library designed for parsing and manipulating JSON data. Its multi-threaded capabilities make it efficient for handling large datasets, while the command-line interface (CLI) provides flexibility and ease of use.
- Multi-threaded JSON Parsing: Utilizes ๐ multi-threading to efficiently parse large JSON files.
- Command-Line Interface (CLI): Offers a user-friendly CLI for performing various operations on JSON data.
- Flexible JSON Tree Manipulation: Functions for counting nodes, displaying trees, filtering data, searching, and more.
- Dynamic Library: Can be compiled as a shared library, making integration with other projects a breeze.
- CMake (Version >= 3.10)
- C++ Compiler (Supporting C++11)
- nlohmann/json (Fetched automatically during build)
mkdir build
cd build
cmake ..
make
#include "json_parser.h"
int main() {
JSONParser parser("example.json");
parser.parse({ "-n" }); // Count nodes
return 0;
}
#include "json_parser.h"
int main() {
JSONParser parser("example.json");
parser.parse({ "-d=node_name" }); // Display tree for a specific node
return 0;
}
#include "json_parser.h"
int main() {
JSONParser parser("example.json");
parser.parse({ "-f=filter_expr" }); // Filter data based on expression
return 0;
}
The library comes with a CLI for easy interaction. For example:
./JSONParserLib -n -d=node_name -f=filter_expr
- If you'd like to contribute to this project, please follow the Contributing Guidelines.
This project is licensed under the MIT License.
- Special thanks to the contributors who made this project possible.
- Inspired by nlohmann/json library.
For questions or support, please contact me