Unserialize from raw representation. (Wrapper)

        Args:
            raw (dict): Raw.
        Raises:
            ParseException: If there was an error parsing data.
512623
def load(self, raw):
        
        try:
            self._load(raw)
        except (KeyError, ValueError) as e:
            raise_from(exception.ParseException('Parse error in %s' % (type(self)), raw), e)
1298182
def from_raw(self, raw: RawScalar) -> Optional[bool]:
        """"""
        if isinstance(raw, bool):
            return raw
651904
def from_dict(cls, raw_data, **kwargs):
        
        instance = cls()
        instance.populate(raw_data, **kwargs)
        instance.validate(**kwargs)
        return instance
518662
def from_raw(raw):
        """"""
        if not isinstance(raw, bytes):
            raise PyVLXException("Position::raw_must_be_bytes")
        if len(raw) != 2:
            raise PyVLXException("Position::raw_must_be_two_bytes")
        if raw != Position.from_int(Position.CURRENT_POSITION) and \
                raw != Position.from_int(Position.UNKNOWN_VALUE) and \
                Position.to_int(raw) > Position.MAX:
            raise PyVLXException("position::raw_exceed_limit", raw=raw)
        return raw
413129
def _serialize_value(val, raw: false)
      if !raw && @desc.write_processors?
        val= @desc.pre_process(val)
      end
      val.unpack('C*')
    end
1028320
@Override
	protected void unserializeFrom(RawDataBuffer in)
    {
    	super.unserializeFrom(in);
    	browserId = new IntegerID(in.readInt());   
    }
1300734
def _deserialize(self, data: dict, silent=True) -> dict:
        '''  '''
        deserialized_data = {}
        for name, field in self._fields.items():
            if field._readonly is False and name in data:
                deserialized_data[name] = data.get(name)
        return deserialized_data
1214626
def deserialize(data):
        
        # Import module & get class
        try:
            module = import_module(data.get('class').get('module'))
            cls = getattr(module, data.get('class').get('name'))
        except ImportError:
            raise ImportError("No module named: %r" % data.get('class').get('module'))
        except AttributeError:
            raise ImportError("module %r does not contain class %r" % (
                data.get('class').get('module'),
                data.get('class').get('name')
            ))

        # Deserialize parameters
        class_params = cls.class_params(hidden=True)
        params = dict(
            (name, class_params[name].deserialize(value))
            for (name, value) in data.get('params').items()
        )

        # Instantiate new instance
        return cls(**params)
1086989
def raw_data(self, value):
        """"""
        if value:
            try:
                value = value.read()
            except AttributeError:
                pass
            b64 = base64.b64encode(value.encode('utf-8'))
            self.data = b64.decode('utf-8')
1292280
def reconstruct_raw(self, rawdata):
        
        start, end = self._rawdata_bounds
        r = rawdata[start:end]
        delattr(self, '_rawdata_bounds')
        try:
            if self._order_list:
                order = to_numpy_list(self._order_list)
                r = r.get_indexed(order)
                delattr(self, '_order_list')
        except AttributeError:
            pass
        self.set_raw(r)
1225478
def load(raw_bytes):
        
        try:
            return yaml.load(raw_bytes)
        except yaml.scanner.ScannerError as e:
            raise SerializationException(str(e))
803697
def process_raw(self, raw: dict) -> None:
        
        raw_ports = {}

        for param in raw:
            port_index = REGEX_PORT_INDEX.search(param).group(0)

            if port_index not in raw_ports:
                raw_ports[port_index] = {}

            name = param.replace(IOPORT + '.I' + port_index + '.', '')
            raw_ports[port_index][name] = raw[param]

        super().process_raw(raw_ports)
964726
def deserialize(self, data, fields=None):
        
        # TODO: it can be that we returned data by `get_lines`, that is already deserialized
        if not isinstance(data, (bytes, bytearray)):
            return data
        return msgpack.unpackb(data, encoding='utf-8', object_pairs_hook=decode_to_sorted)
599555
def from_raw(self, raw: RawScalar) -> Optional[bytes]:
        """"""
        try:
            return base64.b64decode(raw, validate=True)
        except TypeError:
            return None
226984
@Override
	protected void unserializeFrom(RawDataBuffer in)
    {
        super.unserializeFrom(in);
        sessionId = new IntegerID(in.readInt());   
    }
787536
public function unserialize($raw)
    {
        $prefix = substr($raw, 0, 3);
        $encoded = substr($raw, 3);
        if ($prefix == self::GZIP_SERIAL_PREFIX) {
            if (function_exists('gzdecode')) {
                $serialized = gzdecode($encoded);
            } else if (function_exists('gzinflate')) {
                $serialized = gzinflate(substr($encoded, 10, -8)); // alternate method
            } else {
                throw new \RuntimeException('Unable to unzip serialized data!');
            }
        } else if ($prefix == self::BASE64_SERIAL_PREFIX) {
            $serialized = base64_decode($encoded);
        } else {
            $serialized = $encoded;
        }

        // unserialize and sanity check
        $data = unserialize($serialized);
        if ($data && is_array($data) && count($data) == 2) {
            Http::setOptions($data[0]);
            $this->_options = $data[0];
            $this->_auth = $data[1];
            $this->home = $data[1]->home;
        } else {
            throw new \UnexpectedValueException('Invalid serialized data for PmpSdk');
        }
    }
812664
def dump(self, raw=False):
        '''  '''
        raw_out = self.ser.read(self.ser.in_waiting)
        if raw:
            return raw_out
        return raw_out.decode(OUTPUT_ENCODING)