mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 15:55:54 +01:00
Merge pull request #180 from joaoduarte19/serializer
Bug fix when deserialize object with custom type and JSON with null value
This commit is contained in:
commit
5981905c0d
@ -531,8 +531,12 @@ begin
|
|||||||
jdtNone:
|
jdtNone:
|
||||||
Exit;
|
Exit;
|
||||||
jdtObject:
|
jdtObject:
|
||||||
GetTypeSerializers.Items[AValue.TypeInfo].DeserializeAttribute(AValue, AName, AJsonObject[AName].ObjectValue,
|
begin
|
||||||
ACustomAttributes);
|
/// <summary>JsonDataObjects assumes values null as jdtObject</summary>
|
||||||
|
if AJsonObject[AName].ObjectValue <> nil then
|
||||||
|
GetTypeSerializers.Items[AValue.TypeInfo].DeserializeAttribute(AValue, AName, AJsonObject[AName].ObjectValue,
|
||||||
|
ACustomAttributes);
|
||||||
|
end;
|
||||||
jdtArray:
|
jdtArray:
|
||||||
GetTypeSerializers.Items[AValue.TypeInfo].DeserializeAttribute(AValue, AName, AJsonObject[AName].ArrayValue,
|
GetTypeSerializers.Items[AValue.TypeInfo].DeserializeAttribute(AValue, AName, AJsonObject[AName].ArrayValue,
|
||||||
ACustomAttributes);
|
ACustomAttributes);
|
||||||
|
Loading…
Reference in New Issue
Block a user