Skip to content

Instantly share code, notes, and snippets.

@barneywilliams
Created September 20, 2012 14:43
Show Gist options
  • Save barneywilliams/3756337 to your computer and use it in GitHub Desktop.
Save barneywilliams/3756337 to your computer and use it in GitHub Desktop.
JSONSocket - Qt JSON receipt and parsing
void Client::ProcessRequest(void)
{
QByteArray request = tcpSocket->readAll();
QScriptEngine engine;
// Validate that the request was parsed and non-empty
QScriptValue data = engine.evaluate("(" + QString(request) + ")");
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment