Results 1 to 3 of 3

Thread: writing to previously existing json file using Qt5.3

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2014
    Posts
    2
    Qt products
    Qt5

    Default writing to previously existing json file using Qt5.3

    I am using QT 5.3. I have read various materials present online describing how to write json file,but no content describes it systematically and stepwise.

    It would be really helpful if someone can explain the stepwise process of writing a json file in simple language since i am new to qt.

    In my case i have a json file that already exists "LOM.json" with some content.How do i add new data to this.
    Qt Code:
    1. { "LOM": [
    2. { "LOM ID": 1,
    3. "Source": "Open Internet",
    4. "Content": "Complete Reference Java.pdf",
    5. "Difficulty Level": "Hard",
    6. "Type": "Text",
    7. "Length": "Long",
    8. "Topic-Proficiency":
    9. [
    10. { "Topic": "Programming", "Proficiency": "E2" },
    11. { "Topic": "Java", "Proficiency": "E3" }
    12. ]
    13. },
    14. { "LOM ID": 2,
    15. "Source": "Open Internet",
    16. "Content": "www.LatexTutorial.com",
    17. "Difficulty Level": "Medium",
    18. "Type": "WebCourse",
    19. "Length": "Medium",
    20. "Topic-Proficiency":
    21. [
    22. { "Topic": "Latex", "Proficiency": "E2" }
    23. ]
    24. }
    25. ]
    26. }
    To copy to clipboard, switch view to plain text mode 

    Thanks.

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,540
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: writing to previously existing json file using Qt5.3

    Read in Qt doc about this example.

Similar Threads

  1. reading JSON file in Qt5
    By LZAntal in forum Newbie
    Replies: 4
    Last Post: 21st August 2017, 20:44
  2. Replies: 0
    Last Post: 31st May 2013, 14:40
  3. Using external Json file in QML
    By Kelteseth in forum Qt Quick
    Replies: 0
    Last Post: 30th November 2012, 17:08
  4. Replies: 3
    Last Post: 3rd August 2010, 13:12
  5. Replies: 25
    Last Post: 15th January 2006, 00:53

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
  •  
Qt is a trademark of The Qt Company.