MCPcopy Create free account
hub / github.com/bytedance/sonic-cpp / JsonCpp

Class JsonCpp

benchmark/jsoncpp.hpp:68–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66};
67
68class JsonCpp : public JsonBase<JsonCpp, JsonCppParseResult> {
69 public:
70 bool parse_impl(std::string_view json, JsonCppParseResult &pr) const {
71 Json::CharReaderBuilder reader_builder;
72 std::unique_ptr<Json::CharReader> char_reader(
73 reader_builder.newCharReader());
74 if (!char_reader->parse(json.data(), json.data() + json.size(),
75 &pr.document, nullptr)) {
76 return false;
77 }
78 return true;
79 }
80};
81
82#endif

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected