def to_json(self):
        data = {
            'full_message': base64.b64encode(self.full_message),
        }

        metadata = self.get_metadata()
        for k, v in metadata.iteritems():
            if k in HTTPMessage.reserved_meta_keys:
                raise PappyException('A message with %s as a key for a metavalue cannot be encoded into JSON')
            data[k] = v

        return json.dumps(data)
Return a JSON encoding of the message that can be used by
dataset/ETHPy150Open roglew/pappy-proxy/pappyproxy/http.py/HTTPMessage.to_json