eef76d3f
张志伟
feature(*): 修复bug
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package cn.fw.valhalla;
import cn.fw.valhalla.sdk.param.CustomerQueryReq;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.jupiter.api.Test;
/**
* @author : kurisu
* @version :
* @className : Demo
* @description :
* @date : 2023-05-04 09:13
*/
public class Demo {
@Test
public void phoneTest() throws JsonProcessingException {
CustomerQueryReq req = new CustomerQueryReq();
ObjectMapper objectMapper = new ObjectMapper();
String jsonString = JSONObject.toJSONString(req);
System.out.println(jsonString);
jsonString = objectMapper.writeValueAsString(req);
System.out.println(jsonString);
}
}
|