3

We had the Datasnap Servers working with Delphi XE2 but now that we upgraded to Delphi XE3 the following problem is happening:

For example, this function receives a JSON and returns it as well.

function TServerMethods1.Json(Obj: TJSONObject): String;
begin
   Result:= Obj.ToString;
end; 

if you make the request like:

http://localhost:8080/datasnap/rest/TServerMethods1/Json/{“inode”:”221”,”itdmov”:”22”}

In Delphi XE2: {"result":["\"{\u201Cinode\u201D:\u201D221\u201D,\u201Ditdmov\u201D:\u201D22\u201D}\""]}

In Delphi XE3: {"error":"Access violation at address 00660588 in module 'Project1.exe'. Read of address 49F99879"}

I hope somebody can help us with this issue as we have hundreds of functions that receive a TJSONObject and they are all showing errors.

Thank you

Stéphane B.
  • 3,260
  • 2
  • 30
  • 35
David O.
  • 41
  • 3
  • Did you search Quality Central for XE3 bugs? http://qc.embarcadero.com/wc/qcmain.aspx – Jan Doggen Jan 08 '13 at 20:45
  • An update 1 is out for XE3. Is the bug in both versions? – Jan Doggen Jan 08 '13 at 20:45
  • I have actually done the QC search for XE3 issues (currently 105) and found only one that might be remotely related: http://qc.embarcadero.com/wc/qcmain.aspx?d=110833 – Jan Doggen Jan 08 '13 at 20:57
  • Issue was solved changing the type of the parameter received, from TJSONObject to just a String. Then I parsed the string to a JSON Object. – David O. Jul 25 '13 at 14:50

0 Answers0