MCPcopy Create free account
hub / github.com/Kitware/CMake / parse

Method parse

Utilities/cmcppdap/src/jsoncpp_json_serializer.cpp:146–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146Json::Value JsonCppDeserializer::parse(const std::string& text) {
147 Json::CharReaderBuilder builder;
148 auto jsonReader = std::unique_ptr<Json::CharReader>(builder.newCharReader());
149 Json::Value json;
150 std::string error;
151 if (!jsonReader->parse(text.data(), text.data() + text.size(), &json,
152 &error)) {
153 // cppdap expects that the JSON layer does not throw exceptions.
154 std::abort();
155 }
156 return json;
157}
158
159JsonCppSerializer::JsonCppSerializer()
160 : json(new Json::Value()), ownsJson(true) {}

Callers

nothing calls this directly

Calls 3

newCharReaderMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected