admin
2021-11-27 4f015b8c624484e0c3b2d88b944163ce43a48d1f
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
package test;
 
import com.yeshi.location.app.entity.location.LocationUsers;
import org.junit.jupiter.api.Test;
import org.yeshi.utils.JsonUtil;
 
/**
 * @author hxh
 * @title: GsonTest
 * @description: TODO
 * @date 2021/11/24 15:12
 */
public class GsonTest {
 
    @Test
    public void test(){
        LocationUsers users=new LocationUsers();
        users.setUserType(LocationUsers.LocationUserType.father);
        users.setId("123");
        users.setStatus(LocationUsers.LocationInviteStatus.agree);
        users.setTargetName("测试");
        users.setTargetUid(123L);
        users.setTargetPhone("18581318252");
 
        System.out.println(JsonUtil.getApiCommonGson().toJson(users));
 
 
    }
 
}