Browse Source

* Null values should be sent as NULL in json

git-svn-id: trunk@15719 -
michael 15 years ago
parent
commit
67822209c4
1 changed files with 3 additions and 0 deletions
  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;
 function TExtJSJSONDataFormatter.AddFieldToJSON(O : TJSONObject; AFieldName : String; F : TField): TJSONData;
 
 
 begin
 begin
+ if F.IsNull then
+   Result:=O.Items[O.Add(AFieldName)]
+ else
   Case F.DataType of
   Case F.DataType of
     ftSmallint,
     ftSmallint,
     ftInteger,
     ftInteger,