×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Jan 2011
    Posts
    19

    JSON parsing in QT?

    Hi

    Sorry for intervening in the thread. I have to parse a network reply that come in JSON format. I have seen the link here. and the link here states that i need to download json from the link provided here and point my Qt creator IDE to the .pro file. But, the download does not contain any .pro file. can anyone tell me where to get the qjson api zip file. I am using Qt 4.7.2 SDK version 1.1 (technology preview) for symbian^3 (E7)on windows OS. May be I am missing a very simple thing.

    Thanks in advance.

  2. #2
    Registered User
    Join Date
    Jan 2011
    Posts
    19

    JSON parsing in QT?

    Hi

    I have to parse a network reply that come in JSON format. I have seen the link here. and the link here states that i need to download json from the link provided here and point my Qt creator IDE to the .pro file. But, the download does not contain any .pro file. can anyone tell me where to get the qjson api zip file. I am using Qt 4.7.2 SDK version 1.1 (technology preview) for symbian^3 (E7)on windows OS.Hope i made myself clear. May be I am missing a very simple thing.

    Thanks in advance.

  3. #3
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: JSON parsing in QT?

    If you have the source files (which would amount to 1-2K lines of code) then just copy them into your project and compile them with everything else.

    Or you can write your own JSON parser -- takes maybe 2-4 hours.

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2009
    Posts
    1,024

    Re: JSON parsing in QT?

    Is it legal to embed LGPL code inside your application? I think it's not, is it?
    QJason build system is CMake based then .pro file is missing. A simple "qmake -project" should be able to create it.

  5. #5
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How to implement QJson Library in Qt project?

    QJson seems to use cmake instead of qmake, so you should use cmake command instead of qmake command to configure project. You can do it by tweaking Qt Creator project configuration as well.

  6. #6
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: JSON parsing in QT?

    The only distinction would be if you're using a dll (or equivalent) or not. If you use a static lib it's indistinguishable from having compiled and linked as part of your project.

  7. #7
    Registered User
    Join Date
    Mar 2010
    Posts
    29

    Re: JSON parsing in QT?

    Hi,

    You can use a standard Qt library. You must add script module to .pro file. On this site you found some example: http://qtwiki.org/Parsing_JSON_with_...ard_QT_library

    It's working on E7
    Last edited by MegaStar; 2011-03-29 at 00:40.

  8. #8
    Registered User
    Join Date
    Mar 2003
    Posts
    34

    Re: JSON parsing in QT?

    One option is to use some simple and easy to use JSON library like json-cpp. I have just added its files to Qt project and it compiles and works just fine on any target I have tried so far and that includes Symbian, Maemo, Windows, Mac and Linux.

Similar Threads

  1. Need advices on Qt + JSON + cryptography
    By remy_david in forum Qt
    Replies: 24
    Last Post: 2011-03-10, 09:49
  2. XML Parsing (Qt)
    By somnathbanik in forum Qt
    Replies: 6
    Last Post: 2010-10-11, 12:58
  3. JSON Parsing
    By raja_salomo in forum Mobile Java Networking & Messaging & Security
    Replies: 4
    Last Post: 2009-09-25, 08:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •