Results 1 to 4 of 4

Thread: What should be faster: csv, json or xml?

  1. #1
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default What should be faster: csv, json or xml?

    Hello!

    In on of my applications, I have a customized database system (that is, I have a class that manages a database that should use files stored closed to the executable instead of a SQL or similar database system). The data to be stored is relatively simple: sets of data related to a given item.

    The question I have is which is the best way of storing this data... For now, I'm writing it to common text files using CSV style (each line is an item, each data of that item is separated by a semicolon), but I know that Qt has support for JSON and XML archives. My doubt is if it wouldn't be better to use either of this two other alternatives instead of the methodology I'm currently using (and maybe even another option I'm not aware of).

    So my question is: which is the best system to use? (or even "how can I know which is the best system" - without having to go to complicated comparative tests). And does the use of Qt interfere somehow in this decision? (For example lets say Qt's JSON infraestructure is not only faster than XMLs, but also less complicated to learn and apply)


    Thanks,

    Momergil
    May the Lord be with you. Always.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: What should be faster: csv, json or xml?

    which is the best system to use?
    One that works. If you already have a solution that works, and you do not have a definite problem you need to solve (like poor performance or data corruption), then don't change it.

    JSON works well if you have to send the data to a Javascript engine. XML would allow you to use XQuery to find entries in the data file.

  3. The following user says thank you to ChrisW67 for this useful post:

    Momergil (7th March 2014)

  4. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: What should be faster: csv, json or xml?

    Just to make our life more miserable (har har!), SQLite is a database interface working on local files.

    Cheers,
    _

  5. The following user says thank you to anda_skoa for this useful post:

    Momergil (7th March 2014)

  6. #4
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: What should be faster: csv, json or xml?

    Quote Originally Posted by anda_skoa View Post
    Just to make our life more miserable (har har!), SQLite is a database interface working on local files.

    Cheers,
    _
    Thanks anda_skoa for that information! I did a research and I found out that SQLite was what I was needing!

    Changing a lot of code now... :S
    May the Lord be with you. Always.

Similar Threads

  1. json
    By nabeel in forum Newbie
    Replies: 3
    Last Post: 29th August 2013, 08:24
  2. json parsing
    By sabbu in forum Newbie
    Replies: 1
    Last Post: 17th June 2011, 13:04
  3. Qt and JSON
    By Chiggins in forum Qt Programming
    Replies: 2
    Last Post: 28th June 2010, 13:12
  4. json: eval
    By mickey in forum General Programming
    Replies: 3
    Last Post: 17th January 2008, 19:50

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.