deserializePropertyMap function
PropertyMap
deserializePropertyMap(
- dynamic rawPropertyMap
)
Implementation
PropertyMap deserializePropertyMap(dynamic rawPropertyMap) {
final entries = rawPropertyMap["map"]["data"];
final pm = PropertyMap();
entries.forEach((prop) {
final key = prop["key"];
String val = prop["value"]["value"];
String typ = prop["value"]["type"];
final typeTag = getPropertyType(typ);
final newValue = deserializeValueBasedOnTypeTag(typeTag, val);
final pv = PropertyValue(typ, newValue);
pm.setProperty(key, pv);
});
return pm;
}