mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-07 05:50:41 +02:00
updates Deserializer (handle components at last)
This commit is contained in:
parent
c1aa678384
commit
27f22d472d
@ -36,14 +36,16 @@ class Deserializer:
|
|||||||
"Exception": cls.deserialize_exception,
|
"Exception": cls.deserialize_exception,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# First go through handled types (as ColouredEnum is also within the components)
|
||||||
|
handler = type_handler.get(serialized_object["type"])
|
||||||
|
if handler:
|
||||||
|
return handler(serialized_object)
|
||||||
|
|
||||||
# Custom types like Components or DataService classes
|
# Custom types like Components or DataService classes
|
||||||
component_class = cls.get_component_class(serialized_object["type"])
|
component_class = cls.get_component_class(serialized_object["type"])
|
||||||
if component_class:
|
if component_class:
|
||||||
return cls.deserialize_component_type(serialized_object, component_class)
|
return cls.deserialize_component_type(serialized_object, component_class)
|
||||||
|
|
||||||
handler = type_handler.get(serialized_object["type"])
|
|
||||||
if handler:
|
|
||||||
return handler(serialized_object)
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
Loading…
x
Reference in New Issue
Block a user