The following error occurs when I debug my project by changing the Target platform to Android (SDK.22.3.32 bit)
[DCC Error] superobject.pas(601): E2154 Type 'TSuperTableString' needs finalization - not allowed in variant record
The following code works in windows without any issue but not when I change to android platform :
procedure TForm1.Button1Click(Sender: TObject);
var jv: TJSONValue;
jo: TJSONObject;
jp: TJSONPair;
ja: TJSONArray;
i: integer;
j: integer;
strString,strValue,strArray:string;
begin
ListBox1.Clear;
RESTRequest1.Execute;
jv:=RESTResponse1.JSONValue;
jo:= TJSONObject.ParseJSONValue(jv.ToString) as TJSONObject;
try
for i := 0 to jo.Count - 1 do
begin
jp := jo.Pairs[i];
if jp.JsonValue is TJSONArray then
begin
ja := jp.JsonValue as TJSONArray;
for j := 0 to ja.Count -1 do
begin
PrintNamesAndValues(ja.Items[j].ToString);
end;
end;
end;
finally
jo.Free;
end;
end;
**
procedure TForm1.PrintNamesAndValues(prmJson:string);
var O:ISuperObject ;
name,email,tod:string;
begin
O := SO(prmJson);
name := O.S['name'];
tod := O.S['email'];
ListBox1.Items.Add(name+'('+email+')');
end;
Any idea what will be the solution ? please help.
Thanks. /koul