def _load(self, id, data):
        """
        Loads a JSON document taking care to apply the document id
        """
        if isinstance(data, bytes):  # pragma: no cover Python >= 3.0
            data = data.decode('utf-8')

        document = json.loads(data)
        document['_id'] = id
        return document