def save_to_json(self, node_data: dict): # generate flat data, and inject into incoming storage variable obj = self.node_dict.get(hash(self)) if not obj: self.error('failed to obtain local geometry, can not add to json') return node_data['geom'] = json.dumps(flatten(obj))
def storage_get_data(self, storage): # generate flat data, and inject into incoming storage variable obj = self.node_dict.get(hash(self)) if not obj: print('failed to obtain local geometry, can not add to json') return storage['geom'] = json.dumps(flatten(obj))