@classmethod
def decode(cls, msg):
    """
        Decodes messages following Jupyter messaging protocol.
        If JSON decoding fails data is assumed to be a regular string.
        """
    return msg['content']['data']
