1 Star 0 Fork 17

xiaohaozi / Flink_Code

forked from Appleyuchi / Flink_Code 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
User_json.java 518 Bytes
一键复制 编辑 原始数据 按行查看 历史
fastsource 提交于 2021-01-20 21:10 . 整理
import com.alibaba.fastjson.JSON;
import java.io.FileNotFoundException;
import java.io.IOException;
public class User_json
{
public static void main(String[] args) throws FileNotFoundException, IOException
{
//---------------------------User->转json字符串---------------------------
User user = new User("dmego", "123456");
String UserJson = JSON.toJSONString(user);//转化为一个json格式的字符串
System.out.println("简单java类转json字符串:" + UserJson);
}
}
1
https://gitee.com/haozilovecat/Flink_Code.git
git@gitee.com:haozilovecat/Flink_Code.git
haozilovecat
Flink_Code
Flink_Code
master

搜索帮助