From 4caf18339867a2d67b98b32c6b28c21af512b99f Mon Sep 17 00:00:00 2001 From: Daniele Teti Date: Tue, 10 Nov 2020 17:15:24 +0100 Subject: [PATCH] added more flexibility to ObjectDict --- samples/data/ORDERSMANAGER_FB30.FDB | Bin 3358720 -> 3358720 bytes sources/MVCFramework.REPLCommandsHandlerU.pas | 2 +- ...Serializer.JsonDataObjects.CustomTypes.pas | 12 ++++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/samples/data/ORDERSMANAGER_FB30.FDB b/samples/data/ORDERSMANAGER_FB30.FDB index 45dbcba2f4277fc0ada708b67bec6e42fda41844..222ae8df971ebf1d4d64ceae8f9031e990eba479 100644 GIT binary patch delta 266 zcmXwzxlIFM6olWh7_hMyAKaJm+Q4!jAwt425poNZKmq(n-~0h70Ugi*a{3ye2}+;> z7BC}yqX}lD3E?9NCAW#0b(*F9YgiBIB=<72e1ciq8lPsPuTkEw{S|(;X3xK#XRj?! zuAUHym=dX&78NlgX2qPSikg@gbTeg z5j~NMz8HvIu_yN5DZ*n?9alo}kiOgv2g%L2ymNmYy@-Ag{V@7b^yBC!(NCkFML&;z I@#dG|8>EC!p#T5? delta 268 zcmXwzOHM*j7=zF83Mz0B@D2Dv#q0YqG!Ag;kaak70UndDXTVGxxC3`!nEo3u?!hIv z0xqIW+B8j@G=xtda^8FAT)CFZKYEpr{P~yExna&$brLjO`t4l*r{8IpriIDYxxudv z)3>_$n`eXeGXp2p; zCAP(m*cBbIC-%jG=!(M+vhd`Kqe93Y6aV#k*K7J@lplJyjh00_igq0BB-&}TvuNkh NE}~sVyLz|lFa|g~QCR>0 diff --git a/sources/MVCFramework.REPLCommandsHandlerU.pas b/sources/MVCFramework.REPLCommandsHandlerU.pas index 3d30ad9c..3846e84e 100644 --- a/sources/MVCFramework.REPLCommandsHandlerU.pas +++ b/sources/MVCFramework.REPLCommandsHandlerU.pas @@ -26,7 +26,7 @@ uses procedure REPLEmit(const Value: string); begin - write('#> '); + Write('#> '); WriteLn(Value); end; diff --git a/sources/MVCFramework.Serializer.JsonDataObjects.CustomTypes.pas b/sources/MVCFramework.Serializer.JsonDataObjects.CustomTypes.pas index d3c25529..9cf811de 100644 --- a/sources/MVCFramework.Serializer.JsonDataObjects.CustomTypes.pas +++ b/sources/MVCFramework.Serializer.JsonDataObjects.CustomTypes.pas @@ -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, [],