def createMessage(self, klass, **kwargs):
        log.msg("building message for %s" % klass)
        msg = klass()
        
        # create message to pass to other side, kind of stub
        _msg = message._Message()
        # save attrs, otherwise set() raise exception
        # we can't simply assign here, to avoid static members update, using deepcopy
        _msg.attrs = copy.deepcopy(msg.attrs)
        
        for k,v in kwargs.items():
            _msg.set(k, v)
        
        #log.msg("message klass(%s), fields(%s), msg(%s), _msg(%s)" \
        #        % (klass, kwargs, msg.attrs.items(), _msg.attrs.items()), logLevel=logging.DEBUG)
        
        return _msg
Tries to load a json object from a file.
dataset/ETHPy150Open selfsk/nodeset.core/src/nodeset/core/node.py/MessageBuilder.createMessage--crossover with--dataset/ETHPy150Open maebert/jrnl/jrnl/util.py/load_and_fix_json