supamii / QttpServer

Build your API with C++ - Powered by Qt and Node's libuv
https://supamii.github.io/qttpserver/
MIT License
103 stars 35 forks source link

QJsonDocument: Avoid QJsonObject and QJsonArray in interface #24

Open lennartS-7cs opened 7 years ago

lennartS-7cs commented 7 years ago

Previously QJsonObject was used to pass response data. That made it impossible to pass an array as data to the client. To allow both single objects and whole lists of objects, QJsonDocument is now used, which is capable of containing both an object and an array.

Signed-off-by: Lennart Sauerbeck lennart.sauerbeck@sevencs.com

supamii commented 7 years ago

Thanks for the pull request!

lennartS-7cs commented 7 years ago

After 41a896a the tests build again but four of them fail as they did before my changes. I'll create a new commit fixing those and add them to this pull request. Nevermind, I had a look at it and don't quite get what is happening there. It probably should be in a separate pull request.

Please allow me to squash the two commits into one before accepting the pull request once you're okay with my changes.

lennartS-7cs commented 7 years ago

Oh, and before I forget: I made this change while working for my employer. Do you need anything (besides the Signed-Off-By clause) to be okay with corporate changes into your code? We're prepared to send you an e-mail from my manager which wuold grant me the right to publish this change under the MIT license.