MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / loadJSON

Function loadJSON

src/epjson/epJSONTranslator.cpp:293–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291}
292
293Json::Value loadJSON(const openstudio::path& path) {
294 Json::Value root;
295
296 std::ifstream ifs;
297 ifs.open(openstudio::toString(path));
298 Json::CharReaderBuilder builder;
299 JSONCPP_STRING errs;
300
301 [[maybe_unused]] bool success = Json::parseFromStream(builder, ifs, &root, &errs);
302 // todo handle errors here
303
304 return root;
305}
306
307std::string getFieldName(const bool is_array, const IddObject& iddObject, const Json::Value& schema, const std::string& type_description,
308 const std::size_t group_number, const std::size_t field_number, std::string_view field_name) {

Callers 2

toJSONFunction · 0.85

Calls 2

toStringFunction · 0.50
openMethod · 0.45

Tested by 1