当前位置:网站首页>怎样从微信返回的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");
边栏推荐
猜你喜欢

Markdown tutorial

Leetcode question brushing - parity linked list 328 medium

08_ strand

工程师评测 | RK3568开发板上手测试

LeetCode刷题——统计各位数字都不同的数字个数#357#Medium

4. Jctree related knowledge learning

Map介绍

MySQL -- Index Optimization -- order by

语义分割学习笔记(一)

Learn the method code example of converting timestamp to uppercase date using PHP
随机推荐
Yolov5 code reproduction and server operation
Application and practice of Jenkins pipeline
Record an interview
Tidb environment and system configuration check
搭载TI AM62x处理器,飞凌FET6254-C核心板首发上市!
LeetCode刷题——奇偶链表#328#Medium
10_ Redis_ geospatial_ command
Kibana basic operation
TiDB 集群最小部署的拓扑架构
Force deduction solution summarizes the lucky numbers in 1380 matrix
Set set you don't know
语义分割学习笔记(一)
Markdown tutorial
Data analysis thinking analysis methods and business knowledge - business indicators
08_ strand
vChain: Enabling Verifiable Boolean Range Queries over Blockchain Databases(sigmod‘2019)
16_Redis_Redis持久化
Common English abbreviations for data analysis (I)
Mavn builds nexus private server
List set & UML diagram