web前端|js教程
json, Bean, .net JSON格式数据序列化和反序列化
web前端-js教程
测试类:
包edu.xjtu.lee;
植物大战僵尸e源码,VScode编辑c语言配置,ubuntu修改字体,tomcat7 solr,sqlite的创建,php做留言板网页设计,dede的数据库位置,适合做网站服务器的主机,a5担保插件,前端框架require,爬虫新闻抓取,php 拷贝文件,成都企业seo服务,springboot系统详解,幼儿园微网站模板,网页分隔代码,人人商城 页面模板,网站后台管理破解,wpf 页面 刷新,php订单管理系统免费版,提取码 开源程序lzw
进口的java.util.ArrayList;
进口的java.util.List;
win98源码,vscode怎么边改边看,ubuntu ip别名,tomcat需要几个端口,爬虫 负面信息,php开启mssql,媒介投放还是seo工资高,最新校园表白墙网站源码,威客系统手机模板lzw
进口net.sf.json.JSONArray;
进口net.sf.json.JSONSerializer;
javac源码下载,vscode+返回上一级,ubuntu qt 版本,tomcat有rpm包么,闪银爬虫,php项目实例下载,个人seo教程百度推广lzw
公共类JSONArrayTest {
私有静态列表清单;
私人静态字符串jsonStr;
公共静态无效的串行器{
名单=新的ArrayList ;
list.add(新斯图(1,“力强”,“fasdfas”));
list.add(新斯图(2,“照宇”,“dfasdfasdfas”));
list.add(新斯图(3,“技侦”,“fasdffsdafas”));
list.add(新斯图(4“menglirong”,“fasdfsdafasdfas”));
jsonStr = JSONSerializer.toJSON(列表)的ToString;
}
公共静态无效解串器{
JSONArray JA = JSONArray.fromObject(jsonStr);
@SuppressWarnings(“未登记”)
名单 =名单(名单)JSONArray.toCollection(JA,Stu.class);
的for(int i = 0; I <则为list.size;我++)
的System.out.println(list.get(I).getId+“”+ list.get(I).getName+“” + list.get(ⅰ).getPhone);
}
公共静态无效的主要(字串[] args){
串行;
解串器;
}
}
Bean的定义:
包edu.xjtu.lee;
公共类斯图{
私人诠释身份证;
私人字符串名称;
私人字符串说明;
斯图{}
斯图(INT ID,字符串名称,字符串DESC){
this.id = ID;
this.name =名称;
this.desc =说明;
}
公众诠释的getId{
回报ID;
}
公共无效SETID(INT ID){
this.id = ID;
}
公共字符串的getName{
返回名称;
}
公共无效setname可以(字符串名称){
this.name =名称;
}
公共字符串getPhone{
回报递减;
}
公共无效setPhone(字符串DESC){
this.desc =递减;
}
}