mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-04 04:40:39 +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,
|
||||
}
|
||||
|
||||
# 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
|
||||
component_class = cls.get_component_class(serialized_object["type"])
|
||||
if 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
|
||||
|
||||
@classmethod
|
||||
|
Loading…
x
Reference in New Issue
Block a user