mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-16 00:05:53 +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:
|
||||||
|
begin
|
||||||
|
/// <summary>JsonDataObjects assumes values null as jdtObject</summary>
|
||||||
|
if AJsonObject[AName].ObjectValue <> nil then
|
||||||
GetTypeSerializers.Items[AValue.TypeInfo].DeserializeAttribute(AValue, AName, AJsonObject[AName].ObjectValue,
|
GetTypeSerializers.Items[AValue.TypeInfo].DeserializeAttribute(AValue, AName, AJsonObject[AName].ObjectValue,
|
||||||
ACustomAttributes);
|
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