PDA

View Full Version : QJsonDocument: Save objects to file in the same order they where created?



qlands
6th June 2019, 17:36
I am creating a QJsonDocument with several objects based on a ordered list that comes from a CSV, However when I save them to a file those objects do not appear in the same way they where created. I know that for reading a JSON you don't need an order but for non-IT people that would read the JSON they would like to relate to the same order as in the CSV.

Is there a way to save the JSON with an specific order?

Thanks,
Carlos.

ChristianEhrlicher
6th June 2019, 19:27
No, at least not with QJsonDocument, maybe with some third-party stuff