net.sf.json.JSONObject在参数为空时,返回json中没有这个key
来源:互联网 发布:贪心算法最短路径问题 编辑:程序博客网 时间:2024/06/06 03:00
使用net.sf.json.JSONObject
实例:
Person person = new Person();
person.setAge(14);
person.setSex(“Female”);
person.setAddress(“”);
person.setName(“小戏”);
JSONObject tempJson = new JSONObject();
tempJson.put(“name”,person.getName() );
tempJson.put(“age”, person.getAge());
tempJson.put(“address”, person.getAdress());
System.out.println(tempJson.toString());
{“name”:”张云凤”,”age”:14}
在参数为空时,返回的string中没有address值!
阅读全文
0 0
- net.sf.json.JSONObject在参数为空时,返回json中没有这个key
- net.sf.json.JSONObject maven
- 找不到 net.sf.json.JSONObject; ---- jsonObject 需要在 pom 中添加的 maven 依赖
- 在servlet中使用json-lib报错--java.lang.NoClassDefFoundError: net/sf/json/JSONObject
- net.sf.json.JSONObject 为 null 的判断
- net.sf.json.JSONObject 为 null 的判断
- net.sf.json.JSONArray & net.sf.json.JSONObject
- net.sf.json.JSONObject 和org.json.JSONObject 的差别
- net.sf.json.JSONObject 和org.json.JSONObject 的差别。
- net.sf.json.JSONObject 和org.json.JSONObject 的差别
- net.sf.json.JSONObject 和org.json.JSONObject 的差别
- net.sf.json.JSONObject 和org.json.JSONObject 的差别
- net.sf.json.JSONObject 和org.json.JSONObject的差别
- net.sf.json.JSONObject 和org.json.JSONObject 的差别。
- net.sf.json.JSONObject 和org.json.JSONObject 的差别
- net.sf.json.JSONObject 和org.json.JSONObject 的差别
- net.sf.json.JSONObject 和org.json.JSONObject 的差别
- java.lang.NoClassDefFoundError: net/sf/json/JSONObject
- 你好
- gensim 中文语料训练 word2vec
- Java学习笔记(二)运算符和循环选择结构
- maven web项目+tomcat热部署问题
- 伪类:default原来是这个意思啊!
- net.sf.json.JSONObject在参数为空时,返回json中没有这个key
- Unity资源处理机制(Assets/WWW/AssetBundle/...)读取和加载资源方式详解
- <!DOCTYPE html>的作用!
- aop两种代理方式
- Nginx配置proxy_pass转发的/路径问题
- 怎么使用QQ音乐api搭建个人音乐站点
- ibatis中mapper.xml编写
- Kotlin进行Android开发
- 创建openssl pfx证书文件