2020
11-03
11-03
Gson如何序列化内部类
1Gson处理成员内部类1.1编写核心类MainApp:packagecom.yiidian.gson;importcom.google.gson.Gson;publicclassMainApp{publicstaticvoidmain(Stringargs[]){Studentstudent=newStudent();student.setRollNo(1);Student.Namename=student.newName();name.firstName="Mahesh";name.lastName="Kumar";student.setName(name);Gsongson=newGson();//序列化Stringjs...
继续阅读 >