Browse Source

[jsonSerializer] skip only writeable properties

Exilon 5 năm trước cách đây
mục cha
commit
6a34fa13bb
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      Quick.Json.Serializer.pas

+ 1 - 0
Quick.Json.Serializer.pas

@@ -1111,6 +1111,7 @@ begin
       propertyname := rProp.Name;
       propertyname := rProp.Name;
       {$IFNDEF FPC}
       {$IFNDEF FPC}
       comment := '';
       comment := '';
+      if not rProp.IsReadable then Continue;
       for attr in rProp.GetAttributes do
       for attr in rProp.GetAttributes do
       begin
       begin
         if attr is TNotSerializableProperty then ExcludeSerialize := True
         if attr is TNotSerializableProperty then ExcludeSerialize := True