Recursive Descent JSON parser for C++ with SAX-like interface. Written by Kaito Udagawa a.k.a. umireon.
- C++17
- Include
SimpleJsonReader.hppin a way you like. You can commit my works on your tree publicly.
- Apache-2.0: A permissive license whose main conditions require preservation of copyright and license notices. Contributors provide an express grant of patent rights. Licensed works, modifications, and larger works may be distributed under different terms and without source code.
#include <KaitoTokyo/SimpleJsonReader/SimpleJsonReader.hpp>
#include <KaitoTokyo/SimpleJsonReader/SimpleJsonReaderHelpers.hpp>
using namespace KaitoTokyo::SimpleJsonReader;
std::string_view rawName;
parseJson(std::move(buf), [](SimpleJsonReader::Event event) {
if (isString(event) && matchesPathPrefix(event, {"records", 3, "name"})) {
rawName = event.fragment;
}
});
std::cout << "Name: " << my_unescape(rawName) << std::endl;