#1 2013-09-05 09:57:03

wai-kit
Member
From: Amsterdam, the Netherlands
Registered: 2012-11-27
Posts: 90

how to pass string from Smart Mobile to Mormot?

Hi everyone,

I have a client made with Smart Mobile Studio and a Mormot server communicating through an interface. This setup is build on
the units written by LoPiTaL.  I am sending JSON string from the client to the server. When accessing this string (using JSONToObject)
I get an access violation. Tracing into JSONToObject I
see that the string is "", although in the debugger the string passed from the client is shown.
In the client, the parameter is declared as string and in mormot it is RawJSON.
Does anyone have an idea what is happening and what is the correct way to pass string args?

Thanks in advance,
Wai

Last edited by wai-kit (2013-09-05 09:59:40)


fpcdeluxe, FPC 3.2 / Lazarus 2.0, mORMot on Windows 10 ...

Offline

#2 2013-09-05 12:53:26

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: how to pass string from Smart Mobile to Mormot?

Are you using the latest 1.18 "unstable" version of mORMot?
See http://synopse.info/fossil/wiki?name=Get+the+source

At interface level, in mORMot it should be RawUTF8 not RawJSON.
What is your interface definition?

Offline

#3 2013-09-06 08:46:53

wai-kit
Member
From: Amsterdam, the Netherlands
Registered: 2012-11-27
Posts: 90

Re: how to pass string from Smart Mobile to Mormot?

Yes, changing from RawJSON to RawUtf8 solved the problem.
Merci, Arnaud.

Also cool, that I don't have to log in to get the latest source. The Nightbuilds are really handy.

Last edited by wai-kit (2013-09-06 08:48:00)


fpcdeluxe, FPC 3.2 / Lazarus 2.0, mORMot on Windows 10 ...

Offline

#4 2013-09-06 09:02:14

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: how to pass string from Smart Mobile to Mormot?

Yes, daily .zip are easy to work with!

How is the bandwidth from NL for such a 5 MB file?
Is our French-Hosted website responsive?

Offline

#5 2013-09-07 13:59:36

wai-kit
Member
From: Amsterdam, the Netherlands
Registered: 2012-11-27
Posts: 90

Re: how to pass string from Smart Mobile to Mormot?

The 5 MB file is no problem to download. It is quite fast.


fpcdeluxe, FPC 3.2 / Lazarus 2.0, mORMot on Windows 10 ...

Offline

Board footer

Powered by FluxBB