Processing JSON data from a text file
In this recipe, we will learn how to process JSON data taken from a text file and extract it using the stream reader.
How to do it…
Let’s create a simple program that reads and processes XML files by following these steps:
- Create a new Qt Widgets Application project at your desired location.
- Open any text editor and create a JSON file that looks like the following, then save it as
scene.json
:[ { "name": "Library", "tag": "building", "position": [120.0, 0.0, 50.68], "rotation": [0.0, 0.0, 0.0], "scale": [1.0, 1.0, 1.0] } ]
- Continue to write the JSON code by adding...