Problem with JSON Delphi client

(Sindre) #1

RO SDK Version
I’m trying to shift from Binary to JSON on delphi based client application, but gets an error saying it can’t find a specific field name. The mehod on the server is declared like this:
function Login(const aParameter: paraLogin): resLogin;

Both paraLogin and resLogin are complex types. The resulting JSON from the server looks like this:

When I debug it, I see that the TroJSONSerializer tries to find the field PassPhraseLoginResult on the first resul node and not result/Result. So something is wrong - either the structure returned from the server or the interpretation on the client.

We have PHP applications that are using JSON, but there the parsing is hard coded by the developer and I guess that they have discovered the structure and coded accordingly.

We have some .NET based clients as well, but I think all of them are using the binary protocol.

(EvgenyK) #2

pls try to change TROJsonMessage.WrapResult option

(Sindre) #3

That worked. I had to set the SessionIdAsId=true as well.
Thank you.