当前位置:网站首页>怎样从微信返回的json字符串中截取某个key的值?
怎样从微信返回的json字符串中截取某个key的值?
2022-07-02 12:05:00 【杀手不太冷!】
怎样从微信返回的json字符串中截取某个key的值?
String result = HttpClientUtil.getMethodApi(uri, mchId, mchSerialNo, apiV3Key, privateKey);
System.out.println("==========>>>>>>微信接口返回数据:"+result);
/** 先把微信官方返回的json字符串解析成一个json对象 */
JSONObject object = JSONObject.parseObject(result);
/** 然后得到这个json对象的data属性的值,因为data属性的值是一个json数组,因此返回值类型是JSONArray */
JSONArray data = object.getJSONArray("data");
边栏推荐
- Bing. Site Internet
- 13_Redis_事务
- JVM architecture, classloader, parental delegation mechanism
- Apprendre le Code de la méthode de conversion du calendrier lunaire grégorien en utilisant PHP
- [C language] explain the initial and advanced levels of the pointer and points for attention (1)
- FPGA - clock-03-clock management module (CMT) of internal structure of 7 Series FPGA
- Evaluation of embedded rz/g2l processor core board and development board of Feiling
- List集合&UML图
- SQL stored procedure
- 20_ Redis_ Sentinel mode
猜你喜欢
Guangzhou Emergency Management Bureau issued a high temperature and high humidity chemical safety reminder in July
YOLOV5 代码复现以及搭载服务器运行
05_ queue
你不知道的Set集合
搭载TI AM62x处理器,飞凌FET6254-C核心板首发上市!
. Net again! Happy 20th birthday
07_ Hash
15_ Redis_ Redis. Conf detailed explanation
04_ 栈
LeetCode刷题——两整数之和#371#Medium
随机推荐
03_線性錶_鏈錶
11_Redis_Hyperloglog_命令
MD5 encryption
Force deduction solution summarizes the lucky numbers in 1380 matrix
如何对 TiDB 进行 TPC-C 测试
There are 7 seats with great variety, Wuling Jiachen has outstanding product power, large humanized space, and the key price is really fragrant
数据分析思维分析方法和业务知识——业务指标
03_ Linear table_ Linked list
Huffman tree: (1) input each character and its weight (2) construct Huffman tree (3) carry out Huffman coding (4) find hc[i], and get the Huffman coding of each character
Recommended configuration of tidb software and hardware environment
搭建自己的语义分割平台deeplabV3+
Base64 coding can be understood this way
Tidb environment and system configuration check
08_ 串
学习使用php将时间戳转换为大写日期的方法代码示例
5. Practice: jctree implements the annotation processor at compile time
List集合&UML图
06_ Stack and queue conversion
Practice of compiling principle course -- implementing an interpreter or compiler of elementary function operation language
Download blender on Alibaba cloud image station