How to serialize a TAureliusDataSet

Hi there


Is it possible to serialize an Aurelius DataSet? This code below works?

function TBsItensConferenciaCegaLocal.ConferirColeta: Integer;
var
  wproxy: TDaoLvEntradasClient;
  wResult: TFDJsonDataSets;
  Serializer: TDataSnapJsonSerializer;
  JsonValue: TJsonValue;
begin
  Serializer := TDataSnapJsonSerializer.Create;
  wproxy:=TDaoLvEntradasClient.Create(dm.GetConnection);
  try
   // this code works?
    wproxy.ConferirColeta(Serializer.ToJson(AureliusDataSet));
  //
  finally
    wproxy.Free;
    Serializer.Free;
  end;
end;

No, you cannot serialize an AureliusDataset.

It doesn't make much sense anyway, since AureliusDataset is a wrapper for objects - either a list, or a single object. You could simply serialize the underlying objects.

Hi,


Right, and how do I convert a TAureliusDataSet to a Underlying ObjectList?Or doesn't make sense?

It's the opposite: at some point you have provided the objects for the AureliusDataset. Those are the objects you can serialize.

How did you tell AureliusDataset which data is should display? Do you have some code?