10#include <nlohmann/json.hpp>
108[[nodiscard]] nlohmann::json
109to_json(
const std::vector<MaterialPassport> &passports);
128[[nodiscard]] std::string
nlohmann::json generate_blank_template()
Generate a blank MaterialPassport template as JSON.
std::string to_json_string(const MaterialPassport &passport, int indent=4)
Export a single passport as a formatted JSON string.
nlohmann::json to_json(const MaterialPassport &passport)
Export a single MaterialPassport to JSON.
nlohmann::json to_json_with_defaults(const MaterialPassport &passport)
Export a single MaterialPassport to JSON with sensible defaults.
std::span< const SectionDescriptor > section_descriptors()
Get the section descriptors in JSON template order.
A complete material passport for a reused building material.
Describes a section in the JSON export template.
size_t passport_offset
Offset of the section struct within MaterialPassport.
size_t property_count
Number of properties in the array.
const char * name_en
English section name (e.g., "Owner").
const char * name_da
Danish section name (e.g., "Ejer").
const traits::PropertyDescriptor * properties
Pointer to property descriptor array for this section.
Property metadata descriptor.