Administrator
2025-12-09 249ddecd3afeb12537edfef4d7a127ffe32f7b9f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package com.xcong.excoin.modules.okxNewPrice.utils;
 
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
 
/**
 * @author Administrator
 */
public class WsParamBuild {
 
    public static JSONObject buildJsonObject(String connId, String option, JSONArray argsArray) {
        JSONObject jsonObject = new JSONObject();
        if (StrUtil.isNotEmpty(connId)){
            jsonObject.put("id", connId);
        }
        jsonObject.put("op", option);
        jsonObject.put("args", argsArray);
        return jsonObject;
    }
}