Line | Count | Source |
1 | #include <jsoncons/json_parser.hpp> | |
2 | #include <jsoncons/json.hpp> | |
3 | ||
4 | using namespace jsoncons; | |
5 | ||
6 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) | |
7 | 35.5k | { |
8 | 35.5k | std::string s(reinterpret_cast<const char*>(data), size); |
9 | 35.5k | std::istringstream is(s); |
10 | ||
11 | 35.5k | default_json_visitor visitor; |
12 | ||
13 | 35.5k | json_stream_reader reader(is, visitor); |
14 | 35.5k | std::error_code ec; |
15 | 35.5k | reader.read(ec); |
16 | ||
17 | 35.5k | return 0; |
18 | 35.5k | } |