Skip to content

Commit 0d408e3

Browse files
Merge pull request #7 from Valdeirsk8/FixingStackOverFlow
fixing stack overflow in ToJsonObject and ToJsonArray
2 parents 73df1be + 5eba059 commit 0d408e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/Ragna.Impl.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,14 @@ procedure TRagna.ToJson(out AJSON: TJSONObject);
174174

175175
function TRagna.ToJSONArray: TJSONArray;
176176
begin
177-
Result := FQuery.ToJSONArray;
177+
Result := (FQuery as TDataSet).ToJSONArray;
178178
end;
179179

180180
function TRagna.ToJSONObject: TJSONObject;
181181
begin
182182
if FQuery.IsEmpty then
183183
RaiseNotFound;
184-
Result := FQuery.ToJSONObject;
184+
Result := (FQuery as TDataSet).ToJSONObject;
185185
end;
186186

187187
procedure TRagna.ToJson(out AJSON: TJSONArray);

0 commit comments

Comments
 (0)