| 369 | } |
| 370 | |
| 371 | void mitk::PropertyList::ToJSON(nlohmann::json& j) const |
| 372 | { |
| 373 | j = nlohmann::json::object(); |
| 374 | |
| 375 | for (const auto& [name, property] : m_Properties) |
| 376 | { |
| 377 | nlohmann::json serializedProperty; |
| 378 | |
| 379 | if (property->ToJSON(serializedProperty)) |
| 380 | j[property->GetNameOfClass()][name] = serializedProperty; |
| 381 | } |
| 382 | |
| 383 | auto test = PropertyList::New(); |
| 384 | test->FromJSON(j); |
| 385 | } |
| 386 | |
| 387 | void mitk::PropertyList::FromJSON(const nlohmann::json& j) |
| 388 | { |
no test coverage detected