-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathT.java
More file actions
49 lines (24 loc) · 785 Bytes
/
Copy pathT.java
File metadata and controls
49 lines (24 loc) · 785 Bytes
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package com.linkcircle.project;
import java.util.Map;
/**
* @author:老薛
* @version:1.1
* @date:2023/8/15
* @description: 用来测试
* @vx:laoxue004
*/
public class T {
static{
// 解析自定义注解
//
}
public static void main(String[] args) {
String json = "{\"u_name\":\"张三\",\"age\":\"12\",\"favs_ls\":[\"足球\",\"篮球\"],\"other_msg\":\"other_msg\",\"car\":{\"type\":\"奥迪\",\"color\":\"红色\"}}";
JsonConvert<User> jsonConvert = new JsonConvert<>(User.class,json);
//jsonConvert.parse(json);
User user = jsonConvert.convertMapToObject();
System.out.println(user);
}
private static void convertObject(String jsonString, Class<User> userClass) {
}
}