Browse Source

* Null values should be sent as NULL in json

git-svn-id: trunk@15719 -
michael 15 năm trước cách đây
mục cha
commit
67822209c4
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      packages/fcl-web/src/webdata/extjsjson.pp

+ 3 - 0
packages/fcl-web/src/webdata/extjsjson.pp

@@ -80,6 +80,9 @@ end;
 function TExtJSJSONDataFormatter.AddFieldToJSON(O : TJSONObject; AFieldName : String; F : TField): TJSONData;
 
 begin
+ if F.IsNull then
+   Result:=O.Items[O.Add(AFieldName)]
+ else
   Case F.DataType of
     ftSmallint,
     ftInteger,