def to_json()

in datahub/models/record.py [0:0]


    def to_json(self):
        data = {
            "Data": self.encode_values(),
            "Sequence": self._sequence,
            "SystemTime": self._system_time,
            "BatchIndex": self._batch_index
        }
        if self._partition_key:
            data["PartitionKey"] = self._partition_key
        if self._hash_key:
            data["HashKey"] = self._hash_key
        if self._shard_id:
            data["ShardId"] = self._shard_id
        if self._attributes:
            data["Attributes"] = self._attributes
        return data