Results 1 to 2 of 2

Thread: QJsonDocument: Save objects to file in the same order they where created?

  1. #1
    Join Date
    Mar 2010
    Location
    Heredia, Costa Rica
    Posts
    257
    Thanks
    24
    Thanked 17 Times in 14 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default QJsonDocument: Save objects to file in the same order they where created?

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QJsonDocument: Save objects to file in the same order they where created?

    No, at least not with QJsonDocument, maybe with some third-party stuff

Similar Threads

  1. Replies: 2
    Last Post: 16th August 2017, 13:02
  2. Replies: 5
    Last Post: 9th March 2016, 13:28
  3. Replies: 2
    Last Post: 22nd December 2015, 08:34
  4. QJsonDocument toJson(QJsonDocument::Compact) not working
    By elmar.wieser in forum Qt Programming
    Replies: 2
    Last Post: 9th January 2015, 06:23
  5. Replies: 7
    Last Post: 18th July 2006, 21:33

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.