def decode(self, content ):

        if not content:
            return self.className, self.data

        if not isinstance(content, str):
            content = content.decode()

        content = content.strip()

        chunk = self._parse_first_key( content )

        if chunk[2]:
            # this is actually a class name.
            self.className = chunk[0]
            content = chunk[1]
            chunk = self._parse_key(content)
            key = chunk[0]
            content = chunk[1]
        else:
            key = chunk[0]
            content = chunk[1]

        if not key and not content:
            return self.className, self.data

        chunk = self._parse_value(content)
        value = chunk[0]
        content = chunk[1]

        self.data[key] = value

        while len(content) != 0:
            if content[0] == ',':
                content = content[1:]
            else:
                break

            chunk = self._parse_key(content)
            key = chunk[0]
            content = chunk[1]
            if len(content) > 0:
                chunk = self._parse_value(content)
                value = chunk[0]
                content = chunk[1]
                self.data[key] = value
            else:
                self.data[key] = None

        return self.className, self.data
Deserialize a record.
dataset/ETHPy150Open mogui/pyorient/pyorient/serializations.py/OrientSerializationCSV.decode