import json


def emit(thing):
    """emit an RFC 7464 record

    :param thing: something that can be JSON-serialized
    :returns: RFC 7464 record (something that can be written to a stream)
    """
    return b'\x1e' + json.dumps(thing).encode('utf-8') + b'\n'