MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / stringToJson

Function stringToJson

src/common/json_utils.cpp:681–688  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

679}
680
681JsonWrapper stringToJson(const std::string& str) {
682 yyjson_read_err err;
683 auto json = yyjson_read_opts(const_cast<char*>(str.c_str()), str.size(), 0, nullptr, &err);
684 if (json == nullptr) {
685 invalidJsonError(str.c_str(), str.size(), &err);
686 }
687 return JsonWrapper(json);
688}
689
690JsonWrapper stringToJsonNoError(const std::string& str) {
691 return JsonWrapper(yyjson_read(str.c_str(), str.size(), 0 /* flg */));

Callers 1

jsonifyFunction · 0.85

Calls 3

invalidJsonErrorFunction · 0.85
JsonWrapperFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected