Storing real time datas as a JSON File
-
Hi everyone. I have a QMAP. I'm drawing a route on the map. I want to save my drawn routes in a JSON file.
I know we can read json and write json files in qt. But my goal is doing it in real time. When i draw the route, it should save the coordinates as a json file.
Is it possible to store some datas synchronously ? -
QJson API does not support such use case.
What you can do, however, is to (for example) periodically "dump" your route data to a file, updating it if it already exists. Or you can use some other JSON library which supports stream reading and writing. Or use stream writers for XML or CBOR (if switching to a different format is OK for you).
-
Periodic data with same structure -> database :)
-
@Christian-Ehrlicher I want to do it in a format that is both human-readable and machine-readable
-
@suslucoder This is contrary to 'real-time'.