added more flexibility to ObjectDict

This commit is contained in:
Daniele Teti 2020-11-10 17:15:24 +01:00
parent 6fa868b33f
commit 4caf183398
3 changed files with 13 additions and 1 deletions

Binary file not shown.

View File

@ -26,7 +26,7 @@ uses
procedure REPLEmit(const Value: string);
begin
write('#> ');
Write('#> ');
WriteLn(Value);
end;

View File

@ -504,6 +504,18 @@ begin
Continue;
end;
if lObj.Data is TJsonObject then
begin
lOutObject.O[lName] := TJsonObject(TJsonObject(lObj.Data).Clone);
Continue;
end;
if lObj.Data is TJsonArray then
begin
lOutObject.A[lName] := TJsonArray(TJsonArray(lObj.Data).Clone);
Continue;
end;
if TDuckTypedList.CanBeWrappedAsList(lObj.Data, lList) then
begin
fCurrentSerializer.ListToJsonArray(lList, lOutObject.A[lName], TMVCSerializationType.stDefault, [],