Andy 胡

导航

2017年2月7日

Json4:使用json-lib解析、生成Json

摘要: 特征:1.包多2.JSONObject.fromObject 运行结果: {"name":"金公","power":10000}木母 阅读全文

posted @ 2017-02-07 21:31 talkwah 阅读(224) 评论(0) 推荐(0) 编辑

Json3:使用gson做节点解析

摘要: Gson的节点对象:JsonElement : 所有的节点 都是 JsonElement 对象.JsonPrimitive : 基本的数据类型的节点对象,JsonElement的子类JsonNull : 代表空节点对象,即有key,value为空,JsonElement的子类JsonObject : 阅读全文

posted @ 2017-02-07 21:27 talkwah 阅读(378) 评论(0) 推荐(0) 编辑

Json2:使用gson解析为List和Map

摘要: 运行结果: [People@4770a4d0, People@34547854, People@15a7eda3, People@43e27370, People@4808e0e1]徐晃,94 运行结果: {锦马超=People@8c3d026, 猛张飞=People@6f967348} 辅助类: 阅读全文

posted @ 2017-02-07 21:22 talkwah 阅读(694) 评论(0) 推荐(0) 编辑

Json1:使用gson解析、生成json

摘要: Json解析: 1.json第三方解析包:json-lib、gson、jackson、fastjson等2.Google-gson只兼容jdk1.5版本以上;JSON-lib分别支持1.4和1.53.性能:Gson > Json-lib 包:gson-2.3.jar 特征: fromJson():J 阅读全文

posted @ 2017-02-07 21:20 talkwah 阅读(229) 评论(0) 推荐(0) 编辑

JS弹框

摘要: <script type="text/javascript"> function show_alert() { alert('警报'); } function show_confirm() { var result = confirm('确认'); alert(result) } // 取消,返回n 阅读全文

posted @ 2017-02-07 09:52 talkwah 阅读(182) 评论(0) 推荐(0) 编辑

JS操作select

摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <script> function 创建Select() { var _select = document.createElement("sele 阅读全文

posted @ 2017-02-07 09:37 talkwah 阅读(211) 评论(0) 推荐(0) 编辑