码迷,mamicode.com
首页 >  
搜索关键字:jsonobject    ( 880个结果
判断json对象时JSONArray还是JSONObject
判断json对象时JSONArray还是JSONObject 使用的fastjson Object object = js.get("guid"); if (object instanceof JSONArray) { System.out.println("JSONArray"); }else{ ...
分类:Web程序   时间:2020-11-27 11:30:51    阅读次数:13
对象转JSON正则查找替换
package com.smil.gws.wbd.labor;import com.alibaba.fastjson.JSON;import com.alibaba.fastjson.JSONObject;import com.smil.gws.common.utils.GwsReportUtils ...
分类:Web程序   时间:2020-11-26 15:05:39    阅读次数:9
httpclient 发送 json数据,微信security.msgSecCheck,
在微信中,发送httpclient请求 使用了apache的组件 /** * post请求 * @param url * @param json * @return */ public static JSONObject doPost(String url,JSONObject json){ Clo ...
分类:微信   时间:2020-11-11 15:44:03    阅读次数:19
java连接redis数据库获取数据
import com.alibaba.fastjson.JSON; import redis.clients.jedis.Jedis; import com.alibaba.fastjson.JSONObject; import java.util.HashMap; import com.googl ...
分类:数据库   时间:2020-09-18 02:52:16    阅读次数:46
对接接口时,组织参数json出现的问题
在进行对接第三方接口时,进行参数组装成json的过程中出现参数传递格式错误以及json格式化错误。 在拼接json时,如果json中有对象,则以map的方式组装好所有参数。最后map转成json,不然直接用jsonObject对象put参数,会自动在json中的json那里帮我们添加转义符以及把{} ...
分类:Web程序   时间:2020-09-08 20:48:31    阅读次数:66
前端实现大文件上传
文件夹数据库处理逻辑 public class DbFolder { JSONObject root; public DbFolder() { this.root = new JSONObject(); this.root.put("f_id", ""); this.root.put("f_name ...
分类:Web程序   时间:2020-08-11 10:43:49    阅读次数:72
用RSA技术加密解密
package com.sundear.demo; import com.sun.org.apache.xerces.internal.impl.dv.util.Base64; import org.json.JSONObject; import org.junit.jupiter.api.Test ...
分类:其他好文   时间:2020-08-03 23:08:20    阅读次数:68
接口开发遇到BASE64编码并且报文被压缩的情况怎么办
1:核心代码 JSONObject json=(JSONObject) JSON.parse(responseContent); byte [] compress=Base64.decodeBase64((json.getString("result").getBytes("UTF-8"))); ( ...
分类:其他好文   时间:2020-07-22 20:26:49    阅读次数:74
微信公众号获取token,上传素材
public static JSONObject getToken(String appId,String appSecret){ String url="https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&app ...
分类:微信   时间:2020-07-17 14:05:12    阅读次数:111
实体类转json 和 json转实体类
1.new JSONObject().toJSONString(rootEntity) 2. JSONObject jsonObject = JSONObject.fromObject(emp);3.String s= JSONArray.fromObject(user).toString(); j ...
分类:Web程序   时间:2020-07-16 18:16:37    阅读次数:103
880条   上一页 1 2 3 4 ... 88 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!