Results 1 to 2 of 2

Thread: how to parse json with QScriptEngine

  1. #1
    Join Date
    Oct 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default how to parse json with QScriptEngine

    please tell me how to parse json with QScriptEngine, thanks!
    I want to send message to server with json,but I do not parse json with qt
    code in json.js like this:
    ---------------------------------------------------

    {"notify":
    {"list":
    [
    {
    "applicationid":"test.app.com",
    "displayname":"testing",
    "iconpath":"c:\data\test.img",
    "messages":5
    }
    ]
    }
    }
    -------------------------------------------

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: how to parse json with QScriptEngine

    Create a wrapper class that makes a few functions available to your script.

Similar Threads

  1. parsing JSON format
    By Raajesh in forum Qt Programming
    Replies: 5
    Last Post: 11th September 2010, 23:40
  2. Qt and JSON
    By Chiggins in forum Qt Programming
    Replies: 2
    Last Post: 28th June 2010, 13:12
  3. QScriptEngine Printout to String as JSON
    By ManuMies in forum Qt Programming
    Replies: 2
    Last Post: 21st May 2010, 09:24
  4. Build json, how to?
    By martinn in forum Qt Programming
    Replies: 5
    Last Post: 14th March 2010, 15:19
  5. json: eval
    By mickey in forum General Programming
    Replies: 3
    Last Post: 17th January 2008, 19:50

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.