JSONObject json
来源:互联网 发布:架构师和程序员的区别 编辑:程序博客网 时间:2024/06/05 23:06
1、为什么model里面的类都要继承JSONObject:
一个功能强大的串行化库
支持json,xml,等
这个就关系到了json的应用了
轻量级数据交换格式
JSONObject:
可以输出
public static void main(String[] args) {
Map<String,Object> map = new HashMap<String,Object>();
map.put("int", new Integer(1));
map.put("brr",new int[]{1,2,2});
map.put("arr",new int[]{1,2,2});
map.put("fun", "function(i){return this.arr}");
JSONObject json = JSONObject.fromObject(map);
System.out.println(json);
}
输出:(默认排序是根据key的首字母排序):{"arr":[1,2,2],"int":1,"brr":[1,2,2],"fun":function(i){return this.arr}}
import com.alibaba.fastjson.JSONObject;
与其他的有什么不同之处
0 0
- JSONObject json
- jsonobject 遍历 org.json.JSONObject
- jsonobject 遍历 org.json.JSONObject
- jsonobject 遍历 org.json.JSONObject
- jsonobject 遍历 org.json.JSONObject
- JSONObject以及json(转)
- 【json】JsonObject / JsonArray
- JSON中的JSONObject
- Json JsonObject JsonArray
- JSONObject 解析json
- JSON with JSONObject
- JSONObject,JSON,和JSONArray
- json,jsonObject , jsonArray 详解
- JsonObject 解析 json
- JSONObject/JSONArray解析json
- 解析JSON-JSONObject/GSON
- JSONObject 解析json用法
- Json JsonObject JsonArray
- centos安装php扩展imagick-高性能处理图片
- python 接受远程数据并写入数据库的相关模块
- 关于服务器的深入补充
- 边缘检测算法及图像金字塔
- webstorm中使用git
- JSONObject json
- iOS开发-设计模式架构思维
- 死锁:系统中有资源n个,现有k个进程互斥使用,每个进程最多使用m个资源
- 图片腐蚀效果
- 【JZOJ 4585】Robert 的军队
- 图片的变换
- Scala学习笔记(二)--数组、列表、元祖和scala脚本编写及读取文件
- tomcat结合nginx使用小结
- scrollerview嵌套listview问题解决