#1 2014-04-28 16:18:44

畅雨
Member
Registered: 2013-10-24
Posts: 29

ConnectionProperties.GetTableNam return json result?

hi,
Current, GetTableNames  and  GetFieldNames  return result is RawUTF8Array,
Can  return json?

Last edited by 畅雨 (2014-04-28 16:19:51)

Offline

#2 2014-04-28 16:30:02

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

Re: ConnectionProperties.GetTableNam return json result?

You can convert a TRawUTF8DynArray into JSON easily via the following function:

function DynArraySaveJSON(var Value; TypeInfo: pointer): RawUTF8;

using TypeInfo(TRawUTF8DynArray).

Offline

#3 2014-04-29 07:07:36

畅雨
Member
Registered: 2013-10-24
Posts: 29

Re: ConnectionProperties.GetTableNam return json result?

Ok,thanks

Offline

#4 2014-12-08 12:27:03

AntonE
Member
Registered: 2012-02-03
Posts: 74

Re: ConnectionProperties.GetTableNam return json result?

Sorry to revive an old thread, but trying with a TRawUTF8DynArrayDynArray doesn't work?

var Arr:TRawUTF8DynArrayDynArray;
begin
 Arr:=DebtorsList_; (*Can see Arr have correct data in debugger*)
 Result:=DynArraySaveJSON(Arr,TypeInfo(TRawUTF8DynArrayDynArray)); (*Output is just gibberish*)
end;

Am I doing it wrong?
Thanks
AntonE

Last edited by AntonE (2014-12-08 12:27:33)

Offline

#5 2014-12-08 14:38:34

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

Re: ConnectionProperties.GetTableNam return json result?

Should be fixed by http://synopse.info/fossil/info/a873b46d57 for binary serialization.

And http://synopse.info/fossil/info/59b9f86cef for JSON serialization.

Offline

#6 2014-12-08 20:22:54

AntonE
Member
Registered: 2012-02-03
Posts: 74

Re: ConnectionProperties.GetTableNam return json result?

Awesome, working like a charm.
Thank you so much.

Offline

Board footer

Powered by FluxBB