delphi xe6 parse json fil
jeg prøver at parse denne json fil:http://www.weather4u.dk/WordPressium.php
men jeg får hele tiden "invalid class typecast"
procedure TfrmMain.Button2Click(Sender: TObject);
var
LJsonObj : TJSONObject;
LJsonValue : TJSONValue;
LJsonArray : TJsonArray;
LJPair : TJSONPair;
Ltitle : TJSONString;
Ldescription : TJSONValue;
Lupload_date : TJSONValue;
Lid : Integer;
LIndex : Integer;
LSize : Integer;
mydata : string;
begin
mydata := GetURLAsString('http://www.weather4u.dk/WordPressium.php');
LJsonObj := TJSONObject.ParseJSONValue(TEncoding.ASCII.GetBytes(mydata),0) as TJSONObject;
try
Ltitle:=LJsonObj.Get('title').JsonString;
Label1.Text:= LJsonValue.Value;
finally
LJsonObj.Free;
end;
end;
