json
大哥的叔
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
python3生成json
import json from collections import defaultdict res=['253,219,272,219,272,237,253,237', '385,196,399,195,401,212,387,213', '138,186,160,188,157,218,135,216', '220,165,252,165,252,197,220,197', '314,160,333,160,333,188,314,188', '273,159,294,159,294,192,27.原创 2021-03-15 17:41:03 · 1411 阅读 · 0 评论 -
关于java list添加元素后前面的会被后面的覆盖的问题
刚开始创建要存储的数据结构的时候创建在循环之外后面输出发现所有的都显示最后一个 { List<StoreTextInformation> textAndPoints =new ArrayList<>(); StoreTextInformation storeTextInformation = new StoreTextInformation(); JSONObject jsonObject ; jsonObject = ocrM.原创 2020-12-17 11:17:08 · 3548 阅读 · 3 评论 -
使用fast json把java对象列表通过循环生成json 出现 “$ref“:“$.list
首先 引用标识说明: “$ref”:”..” 上一级 “$ref”:”@” 当前对象,也就是自引用 “$ref”:”$” 根对象 {"$ref":"../.."} 引用父对象的父对象 局部方式 player3=JSONObject.parseObject(JSON.toJSONString(player3,SerializerFeature.DisableCircularReferenceDetect)); 普通的spring项目的话,用xml配置 <mvc:annotation-d原创 2020-12-16 14:27:55 · 1667 阅读 · 0 评论 -
通过数组或者列表生成json数组后添加到json对象中的方法
把一个列表或数组生成json数组并添加到json对象中 String string =JSON.toJSON(数组或者列表).toString(); jsonArray =JSON.parseArray(string); jsonObject.put("添加的对象名",jsonArray); 手动向json数组中添加对象 JSONObject json = new JSONObject(); json.put("keya1", "heihei"); js..原创 2020-11-25 11:15:47 · 6098 阅读 · 0 评论 -
java通过post请求发送json以及返回json
通过post请求传入请求体为json返回为json public static void main(String[] args) { String q =base64格式的图片; JSONObject s= JsonToObject("src",q); System.out.println(s); String url ="https://api.mathpix.com/v3/text"; try { .原创 2020-10-31 15:29:08 · 5927 阅读 · 0 评论
分享