[Qt-interest] Parsing JSON with QT using standard QT library dosn't work
Meir Yanovich
meiry242 at gmail.com
Fri Mar 26 07:07:33 CET 2010
Im getting error when using cmake , any body knows what is the problem ?
here is the error:
CMake Error at CMakeLists.txt:25 (qt4_wrap_cpp):
Unknown CMake command "qt4_wrap_cpp".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 2.8)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
On Thu, Mar 25, 2010 at 5:02 PM, Diego Iastrubni <diegoiast at gmail.com>wrote:
> ... or...
>
> Using a more "native" solution:
>
> http://qjson.sourceforge.net/
> http://flavio.castelli.name/qjson_qt_json_library
>
>
> On Thu, Mar 25, 2010 at 9:41 AM, Meir Yanovich <meiry242 at gmail.com> wrote:
>
>> Hello all
>> im trying to fallow the tutorial on which explains how to parse json
>> key/value but it always gives me parsing error
>> and i have no idea why , here is the code :
>> QString http_response =
>> "{\"key\":\"a99fdd865c2-10000\",\"oid\":1000055,\"expires\":0000,\"secret\":\"509c03edfdc7\",\"sign\":\"f0dd9e5226d0e77\"}";
>> QScriptValue sc;
>> QScriptEngine engine;
>> sc = engine.evaluate(http_response);
>> QString hhh = sc.toString();
>>
>> if (!sc.property("key").isNull())
>> {
>> QStringList items;
>> qScriptValueToSequence(sc, items);
>> // LogToFile("--------JSON RESPONSE ------");
>> foreach (QString str, items) {
>> // LogToFile(str);
>> QString ggg = str;
>> }
>> }
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100326/a7ba99bd/attachment.html
More information about the Qt-interest-old
mailing list