|
ReUseX
0.0.5
3D Point Cloud Processing for Building Reuse
|
Functions | |
| MaterialPassport | from_json (const nlohmann::json &j) |
| Import a single MaterialPassport from a JSON object. | |
| std::vector< MaterialPassport > | from_json_array (const nlohmann::json &j) |
| Import multiple MaterialPassports from a JSON array. | |
| std::vector< MaterialPassport > | from_json_string (std::string_view json_str) |
| Import MaterialPassport(s) from a JSON string. | |
|
nodiscard |
Import a single MaterialPassport from a JSON object.
Parses a JSON object matching the Danish "Materialepas for genbrugte byggevarer" interchange format and populates a MaterialPassport struct.
| j | JSON object containing sections, log, and metadata |
| std::runtime_error | if required keys are missing |
|
nodiscard |
Import multiple MaterialPassports from a JSON array.
Each element in the array must be a full passport JSON object.
| j | JSON array of passport objects |
| std::runtime_error | if j is not an array |
|
nodiscard |
Import MaterialPassport(s) from a JSON string.
Auto-detects whether the string contains a single passport object or an array of passports.
| json_str | JSON string to parse |
| nlohmann::json::parse_error | if the string is not valid JSON |
| std::runtime_error | if required keys are missing |