Questions tagged [qjson]

QJson is a qt-based library that maps JSON data to QVariant objects: JSON arrays will be mapped to QVariantList instances, while JSON objects will be mapped to QVariantMap.

QJson is a small and easy-to-use library. Converting a JSON object is as simple as this:

// create a JSonDriver instance
QJson::Parser parser;
bool ok;

// json is a QString containing the data to convert
QVariant result = parser.parse (json, &ok);

Official page | API documentation

85 questions
0
votes
1 answer

QJson QVariantMap to QByteArray

I'm using QJson to parse data returned in json format. One of the returned items is a 80 character byte array. The return from QJson is a QVariantMap that appears to be an array of long integers when viewed in the Qt Creator debugger. Is there a…
DarwinIcesurfer
  • 1,073
  • 4
  • 25
  • 42
0
votes
1 answer

"Failed to create the process" after adding a DLL to the project

[FYI: I've got the answer, and I'm in process of writing the solution. This post is only for reference for others with similar problem] I'm working on some small application on Symbian-Belle platform. Everything was doing well until I've hit a…
quetzalcoatl
  • 32,194
  • 8
  • 68
  • 107
0
votes
1 answer

Youtube data API in XML

I'm working with the data api. I want to retrieve data from a specific video. That works with JSON in PHP. But I need to do that in Qt, that's why XML is easier because I have done it before and its implented in Qt itself. QJson, on the other hand,…
user1633254
0
votes
1 answer

What QJson use to parse syntax of JSON?

I checked source code of qjson library , and it seems to use some .yy files , what was that ? Can such thing be used for any wanted syntax ?
daisy
  • 22,498
  • 29
  • 129
  • 265
-1
votes
1 answer

How to write a sentence into JSON file in Qt not necessarily in JSON format?

I want to write a sentence into a JSON file in Qt. I did it in python and it was quite easy, no need to convert the text into (value, key) pairs but in Qt what I search is only in this format. I wrote a piece of code that splits the sentence into…
mahya
  • 51
  • 4
-1
votes
1 answer

parse json data in c++ with Qt library

I have exactly following json data as follows: [ { "id":"01323", "name":"Json Roy", "contacts":[ "CONTACT1=+917673267299", "CONTACT2=+917673267292", "CONTACT3=+917673267293", "CONTACT4=+917673267294", ] } ] I want to…
Excoder
  • 37
  • 1
  • 7
-1
votes
1 answer

What is the difference between the following Qt QStrings which take Json string as input? Using QTcpSockets

I have a json message to send over a QTcpSocket. Before sending message, the Json message is formatted as below: Case 1 : //Heartbeat = QString("{\"messageType\":\"Heartbeat\", \"Thread_Name\":%1, \"Heartbeat\":%2}").arg(Thread_Name).arg(HbCount); …
ringul
  • 47
  • 7
-1
votes
1 answer

Parsing JSON using QJSON

My json output look like [{"id":2,"name":"AAA"},{"id":1,"name":"BBB"}]. I want to parse this using Qjson in mac. I am trying to parsing but I could not get any outputs . please help me. Thanks in advance.
Finder
  • 8,259
  • 8
  • 39
  • 54
-1
votes
1 answer

failing to build a QJson app for Windows, from Debian

My source code: #include #include int main() { QVariantMap numbers; numbers.insert("one", 1); numbers.insert("two", 2); QJson::Serializer serializer; qDebug() << serializer.serialize(numbers); …
tshepang
  • 12,111
  • 21
  • 91
  • 136
-1
votes
1 answer

Using the QJson library

I know it's a stupid question, but still. I want to use the QJson library in my project. I've downloaded the tarball from the official site (probably need to mention that I'm under 64-bit Ubuntu 12.04). The INSTALL file has the following…
SingerOfTheFall
  • 29,228
  • 8
  • 68
  • 105
1 2 3 4 5
6