You are not logged in.
Pages: 1
Hello everyone, after I updated the mormot I noticed a difference in interface-based services. In my applications I always used a procedure with two output variables. A Result call of the variant type, which I used to pass status (errors, success and messages) and another call Data, which I used to pass data to the user interface, which always results in a json like this:
{
"Result": {
"Code": 0
},
"Data": {
some dto object
}
}
After the update it seems to me that the mormot no longer considers the second output variable and writes the json like this:
{
"result": [
{
"Code": 0
},
{
some dto object
}
]
}
Has anything been changed in this regard?
Last edited by fabiovip2019 (2021-01-14 15:32:54)
Offline
mORMot returns either a JSON object or a JSON array.
By default it is a JSON array, but it may be a JSON object if you specify it.
Check https://synopse.info/files/html/Synopse … #TITLE_466
and https://synopse.info/files/html/Synopse … #TITLE_470
We didn't change anything about this, as far I can tell.
Offline
This is controlled by ResultAsJSONObject and ResultAsJSONObjectWithoutResult options.
In Doc:
https://synopse.info/files/html/Synopse … #TITLE_470
Offline
Thanks macfly,
Thanks, ResultAsJSONObjectWithoutResult was really missing.
Offline
Pages: 1