function encode( message, info, output ) { // eslint-disable-line no-unused-vars
        let diag = ! jsonConfig || jsonConfig.diag;
        let jpath = readJPath( info.property );
        if( jpath ) {
            let msg = publishMessage( info.topic, output );
            setJson( msg, jpath, message );
        } else {
            diag = true;
        }
        if( diag ) {
            log( `json-codec: encode() called for topic [${info.topic}], property [${info.property}] with message [${message}]` );
        }
    }
Encode message before sending.
The output function may be called to deliver an encoded value for the property later.
@param {string} message Message from mqttthing to be published to MQTT
@param {object} info Object giving contextual information
@param {string} info.topic MQTT topic to be published
@param {string} info.property Property associated with publishing operation
@param {function} output Function which may be called to deliver the encoded value asynchronously
@returns {string} Processed message (optionally)