当前位置:网站首页>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 】
边栏推荐
- PG基础篇--逻辑结构管理(锁机制--表锁)
- Base64 encoding
- Cocoscreator resource encryption and decryption
- Bill Gates posted his resume 48 years ago: "it's not as good-looking as yours."
- Xiaomi's path of chip self-development
- Because the employee set the password to "123456", amd stolen 450gb data?
- FFmpeg----图片处理
- Differences between cookies and sessions
- STM32CubeMX,68套组件,遵循10条开源协议
- In the field of software engineering, we have been doing scientific research for ten years!
猜你喜欢

Navigation - are you sure you want to take a look at such an easy-to-use navigation framework?
![leetcode:648. Word replacement [dictionary tree board + find the shortest matching prefix among several prefixes]](/img/3e/cdde4b436821af8700eb65d35e8f59.png)
leetcode:648. Word replacement [dictionary tree board + find the shortest matching prefix among several prefixes]

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

多商戶商城系統功能拆解01講-產品架構

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

Internal sort - insert sort

什么是云原生?这回终于能搞明白了!

小程序目录结构

Ian Goodfellow, the inventor of Gan, officially joined deepmind as research scientist

2022pagc Golden Sail award | rongyun won the "outstanding product technology service provider of the year"
随机推荐
什么是云原生?这回终于能搞明白了!
数据库如何进行动态自定义排序?
MicTR01 Tester 振弦采集模块开发套件使用说明
leetcode:648. Word replacement [dictionary tree board + find the shortest matching prefix among several prefixes]
Excuse me, does PTS have a good plan for database pressure measurement?
Reading and understanding of eventbus source code
Today's sleep quality record 78 points
"July 2022" Wukong editor update record
Substance Painter笔记:多显示器且多分辨率显示器时的设置
一文读懂数仓中的pg_stat
Es log error appreciation -trying to create too many buckets
Decrypt the three dimensional design of the game
JS get the current time, month, day, year, and the uniapp location applet opens the map to select the location
[server data recovery] a case of RAID data recovery of a brand StorageWorks server
【服务器数据恢复】某品牌StorageWorks服务器raid数据恢复案例
AWS学习笔记(三)
Nllb-200: meta open source new model, which can translate 200 languages
Docker deploy Oracle
Attribute keywords ondelete, private, readonly, required
Full details of efficientnet model