json 拼装空list、object
2021-03-29 16:26
阅读:453
标签:details fast zhang tps article zha fastjson tail span
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; public class FastJsonArrayTest { public static void main(String[] args) { JSONObject jo = new JSONObject(); jo.put("name", null); jo.put("age", 123); jo.put("list", new JSONArray()); jo.put("obj", new JSONObject()); System.out.println(jo.toJSONString()); } }
打印结果:
{"age":123,"list":[],"obj":{}}
原文链接:https://blog.csdn.net/tengdazhang770960436/article/details/48930661
json 拼装空list、object
标签:details fast zhang tps article zha fastjson tail span
原文地址:https://www.cnblogs.com/lvchengda/p/12604076.html
下一篇:css常用属性
文章来自:搜素材网的编程语言模块,转载请注明文章出处。
文章标题:json 拼装空list、object
文章链接:http://soscw.com/index.php/essay/69596.html
文章标题:json 拼装空list、object
文章链接:http://soscw.com/index.php/essay/69596.html
评论
亲,登录后才可以留言!