mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 13:49:40 +02:00
* Add jdoIgnoreNulls
git-svn-id: trunk@46308 -
This commit is contained in:
parent
f20c76d73b
commit
f97d12d6d7
@ -113,7 +113,7 @@ Type
|
|||||||
TJSONRestorePropertyEvent = Procedure (Sender : TObject; AObject : TObject; Info : PPropInfo; AValue : TJSONData; Var Handled : Boolean) of object;
|
TJSONRestorePropertyEvent = Procedure (Sender : TObject; AObject : TObject; Info : PPropInfo; AValue : TJSONData; Var Handled : Boolean) of object;
|
||||||
TJSONPropertyErrorEvent = Procedure (Sender : TObject; AObject : TObject; Info : PPropInfo; AValue : TJSONData; Error : Exception; Var Continue : Boolean) of object;
|
TJSONPropertyErrorEvent = Procedure (Sender : TObject; AObject : TObject; Info : PPropInfo; AValue : TJSONData; Error : Exception; Var Continue : Boolean) of object;
|
||||||
TJSONGetObjectEvent = Procedure (Sender : TOBject; AObject : TObject; Info : PPropInfo; AData : TJSONObject; DataName : TJSONStringType; Var AValue : TObject);
|
TJSONGetObjectEvent = Procedure (Sender : TOBject; AObject : TObject; Info : PPropInfo; AData : TJSONObject; DataName : TJSONStringType; Var AValue : TObject);
|
||||||
TJSONDestreamOption = (jdoCaseInsensitive,jdoIgnorePropertyErrors);
|
TJSONDestreamOption = (jdoCaseInsensitive,jdoIgnorePropertyErrors,jdoIgnoreNulls);
|
||||||
TJSONDestreamOptions = set of TJSONDestreamOption;
|
TJSONDestreamOptions = set of TJSONDestreamOption;
|
||||||
|
|
||||||
TJSONDeStreamer = Class(TJSONFiler)
|
TJSONDeStreamer = Class(TJSONFiler)
|
||||||
@ -396,7 +396,9 @@ begin
|
|||||||
If B then
|
If B then
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
DoRestoreProperty(AObject,PropInfo,PropData);
|
if (PropData.JSONType=jtNull) then
|
||||||
|
if Not (jdoIgnoreNulls in Options) then
|
||||||
|
DoRestoreProperty(AObject,PropInfo,PropData);
|
||||||
except
|
except
|
||||||
On E : Exception do
|
On E : Exception do
|
||||||
If Assigned(FOnPropError) then
|
If Assigned(FOnPropError) then
|
||||||
|
Loading…
Reference in New Issue
Block a user