You are not logged in.
In mormot, when the interface-based method returns a value via TrestServerUriContext, can it be wrapped in json format like :
{
code:errcode,
msg:'errmsg',
data/(result):{... } or [... ]
},
Most Rest servers currently communicate with js clients in a format similar to this
Offline
Thank you for your reply.
This is done using method-based services, which do not take advantage of the convenience of interface-based services. Or, in an interface-based service, how do you get the output parameters to be written in such a format?
Offline
At your prompt, I read the source code TrestServerUriContext in detail, and it is indeed possible to override ServiceResultStart and ServiceResultEnd requirements through inherited classes.
Thanks again for the tip.
Offline
My English is poor, most of these contents are written with the help of translation software, some descriptions may not be accurate, which will cause trouble to you.
Offline