import json


def construct_event_json(event, data):
    """
    Helper function to construct a payload for sending to clients
    """
    return json.dumps([event, data], ensure_ascii=False).encode('utf8')