Merge pull request #212 from joaoduarte19/serializer_changes

Bug fix in dataset serializer
This commit is contained in:
Daniele Teti 2019-04-17 23:21:50 +02:00 committed by GitHub
commit 857944a334
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,10 +50,9 @@ uses
type
TMVCDataSetField = record
FieldName: String;
FieldName: string;
DataType: TFieldType;
I: Integer;
IsNull: Boolean;
end;
TMVCDataSetFields = TList<TMVCDataSetField>;
@ -377,7 +376,7 @@ begin
for lField in ADataSetFields do
begin
begin
if lField.IsNull then
if ADataSet.Fields[lField.I].IsNull then
AJsonObject[lField.FieldName] := Null
else
begin
@ -1315,7 +1314,6 @@ begin
ADataSet.Fields[I].FieldName);
lField.DataType := ADataSet.Fields[I].DataType;
lField.I := I;
lField.IsNull := ADataSet.Fields[I].IsNull;
case ANameCase of
ncUpperCase:
lField.FieldName := UpperCase(ADataSet.Fields[I].FieldName);