You are not logged in.
Pages: 1
Hi,
I have a huge app written in ElevateWebBuilder - to - JavaScript which makes extensive use of interface functions.
But somewhere along the way, mormot changed how data can be sent to interface functions. Before I was able to use named JSON variables
eg. with the calculator Example #14
{ "n1" = 3, "n2" = 4 }
Which was convenient because sometimes the order might be different, but mormot would marshall all variables to the correct input parameter.
But mormot has changed its input default to arrays (looking again at example 14)
[ 3, 4 ]
Is there still a way to pass names, so that I don't have to worry about order of parameters?
Thanks
Erick
Offline
Passing named values is supported, as an alternative to the array.
We didn't change anything about that.
Only between Delphi client/server with a valid contract will the array layout be used.
Offline
Note that { "n1" = 3, "n2" = 4 } is not valid JSON.
The syntax is { "n1": 3, "n2": 4 }
Right, it was 4am here and so I mistyped.
I get errors, maybe it's because I'm using contracts with the correct JSON.
I'll try without.
Erick
Offline
Solved, thanks.
Erick
Offline
@erick, how can you write a huge app with ElevateWebBuilder without code-completion?
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Pages: 1