package com.fastbee.common.utils;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class DevParamsUtils {

    public static Map<String, Object> getDevParams(String evParams) {
        Map<String, Object> devData = new HashMap<>();
        try{
            Object devParams = com.alibaba.fastjson.JSON.parse(evParams);    //先转换成Object
            List<Map<String, Object>> Params = (List<Map<String, Object>>) devParams;
            if (Params != null) {
                for (Map<String, Object> param : Params) {
                    devData.put(param.get("key").toString(), param.get("value").toString());
                }
            }
        }catch (Exception exception){
        }

        return devData;
    }
}
