How to convert QJsonObject to QByteArray?
-
I have QJsonObject and i want to convert it into QByteArray. Please tell me how can i perform this action?
QByteArray byteData; QJsonObject Obj2 ={ {"sign_in_provider", "password"} }; QJsonObject Obj = { {"sub","8eZOneltblh5xAwtR7hSljN1hIj2"}, {"aud","ChatApplication"}, {"email","hgaur701@gmail.com"}, {"email_verified",true}, {"firebase",Obj2} }; QJsonObject json { {"uid","8eZOneltblh5xAwtR7hSljN1hIj2"}, {"token", Obj} }; byteData = json; //Error here qDebug()<<byteData;
-
I have QJsonObject and i want to convert it into QByteArray. Please tell me how can i perform this action?
QByteArray byteData; QJsonObject Obj2 ={ {"sign_in_provider", "password"} }; QJsonObject Obj = { {"sub","8eZOneltblh5xAwtR7hSljN1hIj2"}, {"aud","ChatApplication"}, {"email","hgaur701@gmail.com"}, {"email_verified",true}, {"firebase",Obj2} }; QJsonObject json { {"uid","8eZOneltblh5xAwtR7hSljN1hIj2"}, {"token", Obj} }; byteData = json; //Error here qDebug()<<byteData;