package com.njzscloud.common.mqtt.support;

import com.njzscloud.common.core.jackson.Jackson;

public class MqttMsg {
    private final byte[] msg;

    public MqttMsg(byte[] msg) {
        this.msg = msg;
    }

    public <T> T getMsg(Class<T> clazz) {
        return Jackson.toBean(msg, clazz);
    }
}
