Closed AvnerGidron305 closed 6 years ago
found this: Please upgrade ngrest and try new attributes: inlineResult - to make particular operation respond without being wrapped into "result" interface.defaultInlineResult - make the same as above but for any services and operations declared within this interface file You can apply either or both, inlineResult takes precedence over interface.defaultInlineResult. By default both attributes has false value.
-- yourservice.h
// *interface.defaultInlineResult: true
class YourService: public ngrest::Service {
...
// *inlineResult: true
std::list
// *inlineResult: false
std::list<Pet> getPetsNoInline(); // result will be NOT inlined due to inlineResult: false
std::list<Pet> getPets2(); // result will be inlined due to interface.defaultInlineResult
Hi, first of all great project!! second, I was wondering if there is a way to return the result as pure json? return result is now: {"result":{"Pets":[{"species":"canine","name":"spot","birthday":"Jan 1, 2010"},{"species":"feline","name":"puff","birthday":"July 4, 2014"}]}} I would like to get: {"pets":[{"species":"canine","name":"spot","birthday":"Jan 1, 2010"},{"species":"feline","name":"puff","birthday":"July 4, 2014"}]}