Skip to content

msrest.serialization.Deserializer.deserialize_object() cannot handle subclasses #245

@jazelenk

Description

@jazelenk
    def deserialize_object(self, attr, **kwargs):
        ...
        obj_type = type(attr)
        ...
        if obj_type == dict:

The net effect is that when attr is a subclass of dict, the operation raises a TypeError, even though it could be deserialized as a dict.

Changing those if obj_type ==... checks to if isinstance(attr, ... would address this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions