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));
|
|
|
}
|
|
}
|