TAdvStringGrid - Saving JSON into variable, not file

Not sure whether I'm missing the option in the documentation, but I'm looking for a way to save all the data from a TAdvStringGrid in a JSON format, which is then sent as a parameter of a web request.

The best I can find is to save JSON to a file, but not saving into a variable.
Is something like this available, or will I have to loop through the grid and parse it into JSON manually?

Thanks

At this moment there is only support to file in JSON format.
It is a good idea to also offer export as JSON text.
We have added this on the feature request list for consideration for a future update.

There will be an overload in the next update to capture the JSON in a string variable:

var
  JSON: string;
begin
  advstringgrid1.SaveToJSON('rec', nil, JSON);
end;