| 291 | } |
| 292 | |
| 293 | Json::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 | |
| 307 | std::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) { |