You are not logged in.
hi,
Current, GetTableNames and GetFieldNames return result is RawUTF8Array,
Can return json?
Last edited by 畅雨 (2014-04-28 16:19:51)
Offline
You can convert a TRawUTF8DynArray into JSON easily via the following function:
function DynArraySaveJSON(var Value; TypeInfo: pointer): RawUTF8;
using TypeInfo(TRawUTF8DynArray).
Offline
Ok,thanks
Offline
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
Should be fixed by http://synopse.info/fossil/info/a873b46d57 for binary serialization.
And http://synopse.info/fossil/info/59b9f86cef for JSON serialization.
Offline
Awesome, working like a charm.
Thank you so much.
Offline