Results 1 to 2 of 2

Thread: Need suggestion for to write QString to JSON format

  1. #1
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Need suggestion for to write QString to JSON format

    Hi Friends/Experts,
    I need suggestion for my requirement of writting the QString data to json format.

    Im reading data from dbus which returns me data in QString and QVariantMap and im using the data for my Qt GUI.
    at the same time i have to feed the data to a web application .

    the web application developer asked me to give the data in JSON format so he can read and write the data in his application .

    so can you people suggest me a good way of writtin the data which comes from DBUS every time from DBUS to the JSON format .

    Please provide me if any alternate solution or how i can synchronously write a JSON file .

    Thanks in advance. .
    "Behind every great fortune lies a crime" - Balzac

  2. #2
    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: Need suggestion for to write QString to JSON format

    Qt5 has JSON support, e.g. QJsonDocument.

    There are several Qt JSON libraries for Qt4, e.g. simply googling brings up https://github.com/gaudecker/qt-json and http://qjson.sourceforge.net/

    Cheers,
    _

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

    wagmare (18th September 2014)

Similar Threads

  1. Replies: 8
    Last Post: 22nd November 2011, 23:46
  2. Replies: 1
    Last Post: 14th January 2011, 11:57
  3. Replies: 6
    Last Post: 7th December 2010, 12:32
  4. parsing JSON format
    By Raajesh in forum Qt Programming
    Replies: 5
    Last Post: 11th September 2010, 23:40
  5. Opendocument format read/write *.odt
    By patrik08 in forum Qt Programming
    Replies: 7
    Last Post: 17th September 2008, 00:48

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.