You are not logged in.
function DataSetToJSON(Data: TDataSet): RawUTF8;
When Data contains a calculated field, the exception "Argument out of range" is raised.
For example, DevExpress TdxMemData component contains the hidden calculated field RecID. And this function cannot return JSON for TdxMemData.
To fix - it's needed to change Data.FieldDefs[f].Name to Data.Fields[f].FieldName:
// get col names and types
SetLength(W.ColNames,Data.FieldCount);
for f := 0 to high(W.ColNames) do
StringToUTF8(Data.Fields[f].FieldName,W.ColNames[f]); // instead of Data.FieldDefs[f].Name
Offline