当前位置:网站首页>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 】
边栏推荐
- Reading and understanding of eventbus source code
- LeetCode每日一题(636. Exclusive Time of Functions)
- electron remote 报错
- Infinite innovation in cloud "vision" | the 2022 Alibaba cloud live summit was officially launched
- Spatiotemporal deformable convolution for compressed video quality enhancement (STDF)
- OAuth 2.0 + JWT protect API security
- JS in the browser Base64, URL, blob mutual conversion
- Internal sort - insert sort
- 小程序目录结构
- Cocoscreator resource encryption and decryption
猜你喜欢
LeetCode每日一题(636. Exclusive Time of Functions)
Spatiotemporal deformable convolution for compressed video quality enhancement (STDF)
Substance painter notes: settings for multi display and multi-resolution displays
LeetCode 648. Word replacement
EfficientNet模型的完整细节
AWS learning notes (III)
Five pain points for big companies to open source
Huawei cloud database DDS products are deeply enabled
Mmkv use and principle
How bad can a programmer be? Nima, they are all talents
随机推荐
防火墙基础之服务器区的防护策略
C 6.0 language specification approved
Beginner JSP
Today's sleep quality record 78 points
The world's first risc-v notebook computer is on pre-sale, which is designed for the meta universe!
小米的芯片自研之路
多商戶商城系統功能拆解01講-產品架構
Docker deploy Oracle
Lidar Knowledge Drop
【服务器数据恢复】某品牌StorageWorks服务器raid数据恢复案例
Summary on adding content of background dynamic template builder usage
[server data recovery] a case of RAID data recovery of a brand StorageWorks server
智汀不用Home Assistant让小米智能家居接入HomeKit
Bill Gates posted his resume 48 years ago: "it's not as good-looking as yours."
Five pain points for big companies to open source
Démontage de la fonction du système multi - Merchant Mall 01 - architecture du produit
「2022年7月」WuKong编辑器更版记录
KITTI数据集简介与使用
Notes de l'imprimante substance: paramètres pour les affichages Multi - écrans et multi - Résolutions
用于增强压缩视频质量的可变形卷积密集网络