What you get on the native application is exactly what you sent. You need a JSON parser in your native app to make the conversion. For C++11,
https://github.com/nlohmann/json is a very good choice. Also note that you may find it more useful to send actual Javascript objects, rather than trying to come up with a multiline protocol. For example;
{
"command"; "doSomething",
"arg1"; 42,
"arg2'; true
}
rather than "doSomething\n42\ntrue".
With a good JSON parser like the one mentioned above, you will get a string for request['"command'], a number for request["arg1"] and a bool for request["arg2"']
Tony