code: def _json_from_message(message):
      
      try:
          return json.loads(message.payload_utf8)
      except ValueError:
          logger = logging.getLogger(__name__)
          logger.warning("Ignoring invalid json in namespace %s: %s",
                         message.namespace, message.payload_utf8)
          return {}
docs: Parses a PB2 message into JSON format.