A JSON parser for modern C++.
#include <JSONParser.h>
int main() {
std::string_view json = "[1, 2, true, null, { \"key\": \"value\" }]";
if (std::optional<json::Value> json_value = json::parse_value(json); json_value.has_value()) {
// ...
}
}
add_executable(example example.cpp)
add_subdirectory(json-parser-cpp)
target_link_libraries(example PUBLIC JSONParser::JSONParser)
- Parse JSON.
- Improve error handling.
- Add support for indexing a JSON object.