mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 07:45:54 +01:00
REMOVING WARNINGS
This commit is contained in:
parent
26c0eb5eb8
commit
9ef9ede924
@ -46,6 +46,7 @@ type
|
||||
TJSONValueHelper = class helper for TJSONValue
|
||||
public
|
||||
function ToJSON: String;
|
||||
function Count: Integer;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
@ -56,6 +57,11 @@ implementation
|
||||
{$IFNDEF TOJSON}
|
||||
|
||||
|
||||
function TJSONValueHelper.Count: Integer;
|
||||
begin
|
||||
Result := Size;
|
||||
end;
|
||||
|
||||
function TJSONValueHelper.ToJSON: String;
|
||||
begin
|
||||
Result := Self.ToString;
|
||||
|
@ -230,7 +230,7 @@ begin
|
||||
begin
|
||||
cref := attr.Value;
|
||||
list := WrapAsList(o);
|
||||
for I := 0 to Arr.Size - 1 do
|
||||
for I := 0 to Arr.Count - 1 do
|
||||
begin
|
||||
list.Add(Mapper.JSONObjectToObject(cref,
|
||||
Arr.Get(I) as TJSONObject));
|
||||
@ -241,7 +241,7 @@ begin
|
||||
ListMethod := CTX.GetType(o.ClassInfo).GetMethod('Add');
|
||||
if (ListMethod <> nil) then
|
||||
begin
|
||||
for I := 0 to Arr.Size - 1 do
|
||||
for I := 0 to Arr.Count - 1 do
|
||||
begin
|
||||
ListItem := TValue.Empty;
|
||||
|
||||
@ -595,7 +595,7 @@ begin
|
||||
if (lJValue = nil) or (not(lJValue is TJSONArray)) then
|
||||
raise EMVCDeserializationException.Create('Serialized data is not a valid JSON Array');
|
||||
lJArr := TJSONArray(lJValue);
|
||||
for I := 0 to lJArr.Size - 1 do
|
||||
for I := 0 to lJArr.Count - 1 do
|
||||
begin
|
||||
AList.Add(JSONObjectToObject(AClazz, lJArr.Get(I) as TJSONObject));
|
||||
end;
|
||||
|
@ -80,7 +80,6 @@ end;
|
||||
|
||||
procedure TTestJSONSerializer.TestSerUnSerObjectList;
|
||||
var
|
||||
Obj: TMyObject;
|
||||
ObjList, Obj2List: TObjectList<TMyObject>;
|
||||
lJSON: String;
|
||||
I: Integer;
|
||||
|
Loading…
Reference in New Issue
Block a user