当前位置:网站首页>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 】
边栏推荐
- Leetcode——344. Reverse string /541 Invert string ii/151 Reverse the word / Sword finger in the string offer 58 - ii Rotate string left
- 《微信小程序-进阶篇》组件封装-Icon组件的实现(一)
- Source code analysis of ArrayList
- Emqx 5.0 release: open source Internet of things message server with single cluster supporting 100million mqtt connections
- Internal sort - insert sort
- 寺岗电子称修改IP简易步骤
- PG基础篇--逻辑结构管理(锁机制--表锁)
- 激光雷達lidar知識點滴
- Ascend 910 realizes tensorflow1.15 to realize the Minist handwritten digit recognition of lenet network
- Webrtc audio anti weak network technology (Part 1)
猜你喜欢

Simple use of websocket

13 ux/ui/ue best creative inspiration websites in 2022

Full details of efficientnet model

Today's sleep quality record 78 points

Bill Gates posted his resume 48 years ago: "it's not as good-looking as yours."

OAuth 2.0 + JWT protect API security

云上“视界” 创新无限 | 2022阿里云直播峰会正式上线

【愚公系列】2022年7月 Go教学课程 005-变量

2022PAGC 金帆奖 | 融云荣膺「年度杰出产品技术服务商」

Multi merchant mall system function disassembly lecture 01 - Product Architecture
随机推荐
Deformable convolutional dense network for enhancing compressed video quality
2022年13个UX/UI/UE最佳创意灵感网站
FFmpeg----图片处理
智汀不用Home Assistant让小米智能家居接入HomeKit
How bad can a programmer be? Nima, they are all talents
[Yugong series] go teaching course 005 variables in July 2022
拼多多败诉,砍价始终差0.9%一案宣判;微信内测同一手机号可注册两个账号功能;2022年度菲尔兹奖公布|极客头条...
ES日志报错赏析-maximum shards open
Nllb-200: meta open source new model, which can translate 200 languages
Mmkv use and principle
Pert diagram (engineering network diagram)
2022pagc Golden Sail award | rongyun won the "outstanding product technology service provider of the year"
Xiaomi's path of chip self-development
【愚公系列】2022年7月 Go教学课程 005-变量
Excuse me, does PTS have a good plan for database pressure measurement?
Decrypt the three dimensional design of the game
Infinite innovation in cloud "vision" | the 2022 Alibaba cloud live summit was officially launched
一个程序员的水平能差到什么程度?尼玛,都是人才呀...
云上“视界” 创新无限 | 2022阿里云直播峰会正式上线
Beginner JSP