modules: mqtt: add magic encapsulation of serialized data