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

Method stringfy_impl

benchmark/jsoncpp.hpp:40–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 }
39
40 bool stringfy_impl(JsonCppStringResult &sr) const {
41 Json::StreamWriterBuilder writer_builder;
42 std::unique_ptr<Json::StreamWriter> stream_writer(
43 writer_builder.newStreamWriter());
44 std::ostringstream oss;
45 int res = stream_writer->write(document, &oss);
46 sr.data = oss.str();
47 return (res == 0 && oss.good());
48 }
49
50 bool prettify_impl(JsonCppStringResult &sr) const {
51 (void)sr;

Callers

nothing calls this directly

Calls 1

strMethod · 0.80

Tested by

no test coverage detected