You are not logged in.
Hi AB,
if i use nonExpanded Format, the Last Value is RowCount.
ATM i'm missing this Property in TJSONTable.
or is it fast enough to use
JSONVariant(JSON).rowCount
Rad Studio 12.1 Santorini
Offline
AFAIR TJSONTable is parsing the content on the fly.
It does not use the "RowCount" indicator in non Expanded format.
But I guess that a
n := 0;
while table.Step do inc(n);
Is slightly faster than JSONVariant(JSON)...
Even if not perfect.
Offline
TY, i took the first one. But Have one Problem with SeekFirst
Your code should read:
n := 0;
while table.Step(n=0) do inc(n);
or
n := 0;
bSeekFirst := true;
while table.Step(bSeekFirst) do begin
inc(n);
bSeekFirst := false;
end;
cause normally you have to SeekFirst
Could there be an more elegant way to do the SeekFirst ?
Normally in Delphi you do something like:
table.First
while not table.eof do
table.Next;
end;
Both Versions hae their Advantages.
Last edited by itSDS (2014-12-05 12:33:03)
Rad Studio 12.1 Santorini
Offline