MCPcopy Create free account
hub / github.com/MITK/MITK / ToJSON

Method ToJSON

Modules/Core/src/DataManagement/mitkPropertyList.cpp:371–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369}
370
371void 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
387void mitk::PropertyList::FromJSON(const nlohmann::json& j)
388{

Callers 1

Calls 3

NewFunction · 0.50
GetNameOfClassMethod · 0.45
FromJSONMethod · 0.45

Tested by

no test coverage detected