A fast, lightweight JSON parser written in modern C++.
#include "Json.h"
#include <iostream>
#include <unordered_map>
#include <string>
int main() {
std::string input = "\"hello world\" : \"how are you?\"";
std::unordered_map<std::string, json> result = Json::fromString(input);
// Print the parsed JSON key-value pairs
for (const auto& [key, value] : result) {
std::cout << key << " : " << value << std::endl;
}
return 0;
}This will output:
hello world : how are you?
doubles currently have rounding errors- No unicode support (i.e. "\u263A")
- No support for quotation escape sequences (i.e. \")
# Clone the repository
git clone https://github.com/NickR23/jerry.git
cd jerry
# Create a build directory
mkdir build && cd build
# Configure and build
cmake ..
make
# Run tests
ctest