当前位置:网站首页>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 】
边栏推荐
- Huawei cloud database DDS products are deeply enabled
- PLC:自动纠正数据集噪声,来洗洗数据集吧 | ICLR 2021 Spotlight
- Zhiting doesn't use home assistant to connect Xiaomi smart home to homekit
- Today's sleep quality record 78 points
- 【服务器数据恢复】某品牌StorageWorks服务器raid数据恢复案例
- Nllb-200: meta open source new model, which can translate 200 languages
- PD virtual machine tutorial: how to set the available shortcut keys in the parallelsdesktop virtual machine?
- Differences between cookies and sessions
- JSON解析实例(Qt含源码)
- NLLB-200:Meta开源新模型,可互译200种语言
猜你喜欢
今日睡眠质量记录78分
Base64 encoding
Leetcode one question per day (636. exclusive time of functions)
数据湖(九):Iceberg特点详述和数据类型
Mrs offline data analysis: process OBS data through Flink job
PyTorch模型训练实战技巧,突破速度瓶颈
Five pain points for big companies to open source
大厂做开源的五大痛点
Full details of efficientnet model
#yyds干货盘点# 解决名企真题:交叉线
随机推荐
大厂做开源的五大痛点
Shengteng experience officer Episode 5 notes I
Pytorch model trains practical skills and breaks through the bottleneck of speed
In the field of software engineering, we have been doing scientific research for ten years!
智汀不用Home Assistant让小米智能家居接入HomeKit
Substance Painter筆記:多顯示器且多分辨率顯示器時的設置
6. Electron borderless window and transparent window lock mode setting window icon
小程序目录结构
2022PAGC 金帆奖 | 融云荣膺「年度杰出产品技术服务商」
激光雷达lidar知识点滴
Leetcode - Sword finger offer 05 Replace spaces
Es log error appreciation -- allow delete
Docker deploy Oracle
JS image to Base64
Applet directory structure
[Yugong series] go teaching course 005 variables in July 2022
LeetCode每日一题(636. Exclusive Time of Functions)
Navigation - are you sure you want to take a look at such an easy-to-use navigation framework?
PD virtual machine tutorial: how to set the available shortcut keys in the parallelsdesktop virtual machine?
Leetcode——344. Reverse string /541 Invert string ii/151 Reverse the word / Sword finger in the string offer 58 - ii Rotate string left