Hi Community, I have been wrestling with this most of the day, and yes it is something really stupid that I am doing that is causing my problem, but I can't for the life of me find it!

So I am connecting directly to a Teltonika router that has a SIM in it, there is a Json string that can be sent to get information, the first part of that is to send via curl the following:
curl -d "{ "jsonrpc": "2.0", "id": 1, "method": "call", "params": [ "00000000000000000000000000000000", "session", "login", { "username": "root", "password": "********" } ] }" http://192.168.2.1/ubus

Which returns the following authentication.

{"jsonrpc":"2.0","id":1,"result":[0,{"ubus_rpc_session":"711dddfa1d3d391f2a1bcde0f58 4a796","timeout":300,"expires":300,"acls":{"access-group":{"superuser":["read","write"],"unauthenticated":["read"]},"ubus":{"*":["*"],"session":["access","login"]},"uci":{"*":["read","write"]}},"data":{"username":"root"}}]}


When I try to send it in Qt via QProcess I get the following parse error
{"jsonrpc":"2.0","id":null,"error":{"code":-32700,"message":"Parse error"}}

My guess is that I have done something really stupid with an escape character, any help would be appreciated, so my code, I create a QString that holds the curl command:

jsonAuthenticate = "curl -d";
jsonAuthenticate += " "{ "jsonrpc": "2.0", "id": 1, "method": "call", "params": [ "00000000000000000000000000000000", "session", "login", { "username": "root", "password": "********" } ] }"";
jsonAuthenticate += " http://192.168.2.1/ubus ";


Then I use QProcess
QString prErrors = "";
QString prStandard = "";
QProcess process;
qDebug() << jsonAuthenticate;
process.start(jsonAuthenticate);
process.waitForFinished(5000);
process.exitStatus();
prErrors = process.readAllStandardError();
prStandard = process.readAllStandardOutput();


I have also tried using extra escape chars on the json string i.e.

"{ "jsonrpc": "2.0", "id": 1, "method": "call", "params": [ "00000000000000000000000000000000", "session", "login", { "username": "root", "password": "********" } ] }"

The plaform I am operating in is Ubuntu16.04 with
Qt Creator 4.2.1
Based on Qt 5.8.0 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit)


All the best...
Phil