def _convert_from(data):
    """Internal function that will be hooked to the native `json.loads`

    Find the right deserializer for a given value, taking into account
    the internal deserializer registry.
    """
    try:
        module, klass_name = data['__class__'].rsplit('.', 1)
        klass = getattr(import_module(module), klass_name)
    except (ImportError, AttributeError, KeyError):
        # But I still haven't found what I'm looking for
        #
        # Waiting for three different exceptions here. KeyError will
        # raise if can't find the "__class__" entry in the json `data`
        # dictionary. ImportError happens when the module present in the
        # dotted name can't be resolved. Finally, the AttributeError
        # happens when we can find the module, but couldn't find the
        # class on it.
        return data
    return deserialize(klass, data['__value__'])
Internal function that will be hooked to the native `json.loads`

    Find the right deserializer for a given value, taking into account
    the internal deserializer registry.