当前位置:网站首页>JSON parsing instance (QT including source code)
JSON parsing instance (QT including source code)
2022-07-07 14:49:00 【51CTO】
JSON analysis
Qt There is a built-in QJsonDocument Class is used to handle json file , as well as json character string . Analytical thinking first string Load into QJsonDocument in , Then analyze it layer by layer .json The format of contains two ,1) object ,2) Array
| name | analysis |
|---|---|
| QJsonDocument | A complete package JSON Class of document , It can be downloaded from UTF-8 Coded text-based representation and Qt Read and write the document in its own binary format |
| QJsonObject | Is a list of key value pairs , Where the key is the only string , Values are determined by QJsonValue Express . |
| QJsonArray | JSON An array is a list of values . You can insert and delete... From the array QJsonValue To manipulate the list . |
| QJsonValue | JSON It's a format for storing structured data . It has 6 Basic data types :bool、double、string、array、object、null |
| QJsonParseError | Used in JSON Error reported during parsing |
Object parsing
Test data
Qt json Parse object Code
Running results
Array parsing
Test data
Qt json Parse array code
Running results
Mixed parsing of array objects
Test data
Qt json Parsing code
Running results
Object array mixed parsing
Test data
Qt analysis json Code
Running results
official account :【qt The little prince 】
边栏推荐
- Introduction and use of Kitti dataset
- ES日志报错赏析-- allow delete
- WebRTC 音频抗弱网技术(上)
- Half an hour of hands-on practice of "live broadcast Lianmai construction", college students' resume of technical posts plus points get!
- 6、Electron无边框窗口和透明窗口 锁定模式 设置窗口图标
- LeetCode每日一题(636. Exclusive Time of Functions)
- Leetcode——236. The nearest common ancestor of binary tree
- 2022 cloud consulting technology series high availability special sharing meeting
- GAN发明者Ian Goodfellow正式加入DeepMind,任Research Scientist
- The method of parsing PHP to jump out of the loop and the difference between continue, break and exit
猜你喜欢

2022PAGC 金帆奖 | 融云荣膺「年度杰出产品技术服务商」
![[today in history] July 7: release of C; Chrome OS came out;](/img/a6/3170080268a836f2e0973916d737dc.png)
[today in history] July 7: release of C; Chrome OS came out; "Legend of swordsman" issued

Docker deploy Oracle
![[server data recovery] a case of RAID data recovery of a brand StorageWorks server](/img/8c/77f0cbea54730de36ce7b625308d2f.png)
[server data recovery] a case of RAID data recovery of a brand StorageWorks server

一个程序员的水平能差到什么程度?尼玛,都是人才呀...

小米的芯片自研之路

C 6.0 language specification approved

Substance Painter筆記:多顯示器且多分辨率顯示器時的設置

Leetcode one question per day (636. exclusive time of functions)

Internal sort - insert sort
随机推荐
什么是云原生?这回终于能搞明白了!
Docker deploy Oracle
Ffmpeg --- image processing
Huawei cloud database DDS products are deeply enabled
Five pain points for big companies to open source
OAuth 2.0 + JWT protect API security
6. Electron borderless window and transparent window lock mode setting window icon
Cocoscreator resource encryption and decryption
一款你不容错过的Laravel后台管理扩展包 —— Voyager
leetcode:648. 单词替换【字典树板子 + 寻找若干前缀中的最短符合前缀】
时空可变形卷积用于压缩视频质量增强(STDF)
Beginner JSP
Today's sleep quality record 78 points
Because the employee set the password to "123456", amd stolen 450gb data?
「2022年7月」WuKong编辑器更版记录
6、Electron无边框窗口和透明窗口 锁定模式 设置窗口图标
数据库如何进行动态自定义排序?
Find your own value
PyTorch模型训练实战技巧,突破速度瓶颈
Electronic remote error