package cn.iocoder.yudao.module.iot.controller.admin.mqttrecord.vo;

import com.alibaba.fastjson.JSON;

import java.util.Map;

public class MqttDataUtils {

	public static MqttData parse(String entity){
		try {
			MqttData data = JSON.parseObject(entity, MqttData.class);
			return data;
		}catch (Exception e){
			e.printStackTrace();
		}
		return null;
	}
	public static MqttData parseMap(Map<String, Object> param){
		try {
			MqttData data = JSON.parseObject(JSON.toJSONString(param), MqttData.class);
			return data;
		}catch (Exception e){
			e.printStackTrace();
		}
		return null;
	}
}
