package com.beijxing.TestMain;

 import com.beijxing.entity.Student;
import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName; /**
*
* @author 作者 : ywp
* @version 创建时间:2016年10月30日 下午9:21:33
*/
public class TestGson1 {
public static void main(String[] args) {
testGson();
}
public static void testGson(){
Student student = new Student();
student.setId(1);
student.setName("杨文培");
student.setSex("男");
//student.setAge(23);
student.setBirthday("1993-01-23");
Gson gson = new Gson();
System.out.println(gson.toJson(student));
}
}

最新文章

  1. mysql导入导出,及错误记录
  2. MongoDB 知识要点一览
  3. 【转】Android 当打开“开发者模式”中的“不保留活动”后,程序应当怎么保持正常运行
  4. Eclipse字符集设置方式
  5. 用TMS的控件就可以了,有bug叫他们改
  6. linux cpu亲和性设置
  7. 转:JavaScript定时机制、以及浏览器渲染机制 浅谈
  8. Hololens文件读写
  9. strictmode
  10. 【BZOJ4554】游戏(二分图匹配,网络流)
  11. 【移动开发】Service类onStartCommand()返回值和参数
  12. Feature Preprocessing on Kaggle
  13. Oracle 11g 测试ogg中断之后,重新同步操作
  14. ActiveMQ的作用总结(应用场景及优势)
  15. Redis详解(七)------ AOF 持久化
  16. 在windows环境下实现开机延迟启动tomcat
  17. LINQ学习之旅 C#3.0新特性(一)
  18. 在Ubuntu环境下安装eclipse
  19. jq的$(function(){})与window.onload的区别
  20. Java类中的各种成员的加载顺序

热门文章

  1. logback
  2. boost asio tcp server 拆分
  3. 基于Grunt&Mocha 搭建Nodejs自动化单元测试框架(含代码覆盖率统计)
  4. java中static 和 final 的一些使用规则
  5. C语言atan2()函数:求y/x的反正切值
  6. mysql日志与备份恢复
  7. 第三章 Git的入门 - 读书笔记
  8. java comet
  9. Raspberry pi之树莓派基础建设-2
  10. HTML 浏览器显示控制